Create One-To-One relationship between table and view in EF4?
I have a table Item (ItemId int PK, Title vc, Description vc)
I created a testing view called ItemView: SELECT * FROM Item.
I added this view to my model, removed all the keys but the real key, added a 1-1 association, and mapped it, but I get 2 errors:
- The table/view 'dbo.ItemView' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
- Error 3021: Problem in开发者_运维百科 mapping fragments starting at line xxxx: Each of the following columns in table Item is mapped to multiple conceptual side properties: Item.ItemId is mapped to What can be the problem?
Edmx Views Processor - a hotfix for this issue.
精彩评论