I use DataObjects.Net on the NorthWind database. When I start my program, it gives this exception:
It appears to me that it wants to delete all tables, and if I use UpgradeMode recreate, I lose all tables. How can I solve this? |
Hello Sjoerd, DataObjects.Net defaults to automatically maintaining database schema according to your persistent types. This is the main and recommended approach. Alternatively you could use externally maintained database schema but this mode have some limitations. Denis, thank you for your answer. I already have persistent types, ver much like this file. Why doesn't DO use those types? If I use LegacySkip I get the exception "Type 'Northwind.DataObjects.Product' is not found in model." Have you registered Product type in DomainConfiguration? Also it's worth to mention that model from ormbattle is not real northwind but rather northwind-inspired custom model. So it's not compatible even in legacy mode. |