@liangshiwei thanks for Your Valuable Replay Actually, four tables in one database I want to create the one is to one relationship between their tables each table is interconnected to each other if I delete one record of one table It should delete the respected records of another table i i want to generate the crud page for all this table
and regarding that Data time
OneTimeRunner.Run(() =>
{
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<DateTime>("DateOfBirth",
property =>
{
var format = new DisplayFormatAttribute()
{
DataFormatString = "dd/MM/yyyy"
};
property.Attributes.Add(format);
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.DisplayName = new FixedLocalizableString("Date Of Birth");
property.DefaultValueFactory = () => DateTime.Now;
//...other configurations for this property
}
);
});
});
});
}
i Have added this code again its showing same
Can you provide solution for this please Actually, four tables in one database I want to create the one is to one relationship between their tables each table is interconnected to each other if I delete one record of one table It should delete the respected records of another table i i want to generate the crud page for all this table
Hi,
As far as I know, it's not possible to create a navigation property in a different database.
You should create relationships through code logic.
How to do that, can you guide us
they are configuring multiple databases in one module
The database is separated, and each module can have its own database, by configuring the connection string, a module can access the b database
See: https://docs.abp.io/en/abp/latest/Connection-Strings
Or you can use the C# API client proxies, This way you can access the API, but not directly read the database in the module
And as we Can See if I am Adding the Date Of Birth in Configure Extra property It's Showing DD-MM-YY-HH-MM-AM I need only DD-MM-YYYY can anyone suggest how to configure that....
You can add DisplayFormatAttribute to the extra property:
ObjectExtensionManager.Instance.Modules() .ConfigureIdentity(identity => { identity.ConfigureUser(user => { user.AddOrUpdateProperty<DateTime>( "Birthday", property => { var format = new DisplayFormatAttribute() { DataFormatString = "dd/MM/yyyy" }; property.Attributes.Add(format); } ); }); });
I tried that it's not working it's showing the same and I need a solution As we know when we create a project we will get the identity model in that we have a user, and role management this is in my main database and I have another model where I have the Candidate table which is in another database. in roles, I have a practitioner and I want to assign Practitioner to the Candidates please help me with this I followed that document but it's not working
Hi,
You can set the connection string. See: https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Migrations#change-the-connection-strings-section
Hey, Thanks for replying.
I have gone through this documentation but in this documentation, they are configuring multiple databases in one module. But I have two modules and I Need the data of the Base module for My other Module I have MY multiple Connection String and dBContext. But I am not able to the list of user whose Role Is Teacher in my Sub Module......
<br> And as we Can See if I am Adding the Date Of Birth in Configure Extra property It's Showing DD-MM-YY-HH-MM-AM I need only DD-MM-YYYY can anyone suggest how to configure that....
yes we are also facing the same exception