Doing your own Primary keys
MDriven legacy is to give the name Eco_Id to primary keys. New MDrivenSystems use <Classname>Id to make the database easier to read.
You can choose the default strategy freely if you are using MDriven Framework in Visual Studio.
In the Play-button-prototyper you can choose from legacy or MDriven:
In Code you can go like this:
else if (rbPMappMDrivenServer.Checked) { if (_ORMappingForMDrivenServer == null) { _ORMappingForMDrivenServer = new Eco.Persistence.ORMapping.DefaultORMappingBuilder(); _ORMappingForMDrivenServer.ChildMapRootClass = true; _ORMappingForMDrivenServer.DefaultSingleLinkColumnName = "<Name>ID"; _ORMappingForMDrivenServer.IdColumnName = "<TableName>ID"; } persistenceMapperSqlServer1.RunTimeMappingProvider = _ORMappingForMDrivenServer; persistenceMapperSqlServer1.NewMappingProvider = _ORMappingForMDrivenServer; }
This page was edited more than 1 years ago on 01/11/2024. What links here