My app is purely read-only so I don't want to generate all the update & delete code, and I don't want to pull in all fields from all tables. Some of these fields are not nullable so I am getting errors from EF here becasue there is no default value to save.
In my previous ORM (Wilson) you could just flag an entity as read-only in the XML. I've seen a few posts showing convoluted solutions to this. Am I missing something? Why isn't this straight forward?
I see that the RIA services wizard has a check box for this for each entity...
The problem is that you have a non-nullable field in your SSDL which isn't in your CSDL.
You can manually remove the column from SSDL and the EF will be happy. But the designer will re-add the column when you update the model. So you can either remove it again or update your model from a variant of the DB which doesn't have that column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With