开发者

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:

  1. 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.
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜