المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Entity Framework: EDM assigns primary key to view randomly (or so it seems)



C# Programming
07-04-2009, 02:00 AM
Hi,
I made a view from a few tables. I then imported that view into my Entity Data Model. The EDM assigned Entity Key = true to a column in the view that is not a primary key (the column is not a primary key in the view, and it is not a primary key in the table the view gets it from).

Why does the EDM do this? It assigned Entity Key = true to a value that IS an actual primary key (in the table my view looks at) and also to a value that ISN'T a primary key. I can't figure this out. Can anyone help me out?

TIA

PS -- I apologize if this is not the right forum, but since in the EDM I am dealing with C# code, I thought I'd post it here.