My EF schema has a mixture of tables and views from my database. My view entities开发者_C百科 are all read-only, I want to be able to update/insert into these entities. I've tried the following post without any luck:
http://smehrozalam.wordpress.com/2009/08/12/entity-framework-creating-a-model-using-views-instead-of-tables/
Anyone have another ideas/pointers - this must be doable.
cheers David
Generally the post is correct. Using views in EF is hard. Another trick is first using tables to define your model and then replace tables in database with views with same names as tables.
Have you tried Instead of Triggers?
http://www.codeproject.com/Articles/236425/How-to-insert-data-using-SQL-Views-created-using-m
精彩评论