I am trying to customize an Entity Framework model associated with a bunch of views. When I add a view, he wants to make most of the fields in the Entity Key for no apparent reason.
Even worse, when I try to create a relationship between these two views, I get an error message indicating that I should specify a mapping for all key properties ... although I changed all of them so that I would no longer be Entity keys. I think that the basic table model still marked them as keys, but I cannot change it in the .store object in the designer.
So,
1) How to prevent the use of EF for each field as a primary key?
2) How to remove EntityKey = true value from .store object?
3) Why is it so complicated?
EDIT: Alright, got it No. 1. I had to manually edit the xml and remove the keys from the SSDL, as well as the CSDL section ...
Now, if someone can answer 2 and 3, I could get somewhere!;)
source
share