On large model generation errors
I have a large data model that I generate the model from.
- It seems that when the model foreign key is written out the foreign key hybrid reference is written twice if the second comes before the first in the listing (minor problem that can be corrected by hand)
- The using statements are written inside the namespace but should be outside as it is ignored where it is (minor problem as it can be handled by a global using)
- When the columns in the database has chars that is not allowed in identifiers in C# they are not changed fx I have a . and / which makes the property names fail (Minor problem as it can be handled by not importing the tables)
- When a foreign key is not found the script crashes instead of just either ignoring the attribute or marking it as an error line (Major problem as when removing table patterns generation fails)
The data model of the database is an old data model I import to my anticorruption layer to not polute my new corrected data model
Vith regards to this "It seems that when the model foreign key is written out the foreign key hybrid reference is written twice if the second comes before the first in the listing (minor problem that can be corrected by hand)" it seems to be that one key is exspected as it seems to fail sometimes with the correct foreign key standing to and buttom
I honestly don't expect the model generator to solve all the situations. I usually have my entities done code-first before I start working on the DAL.
Btw, just added a new version of the generator, with better support for schemas and more customization options.