0
I have the following problem:
Every time I update the Diagram model of my project, it loses the reference of which field is the primary key, even I try the PK in the table in my Database. Does anyone have any idea what might be causing this ?
0
I have the following problem:
Every time I update the Diagram model of my project, it loses the reference of which field is the primary key, even I try the PK in the table in my Database. Does anyone have any idea what might be causing this ?
1
I’ve set up some projects in this scenario but I’ve never had any problems in this regard. But when I model banks, I always put PK as the identity column as well. What version of Entity are you using? see a similar bug in this link:
http://dotnetwindow.blogspot.com.br/2012/06/using-decimal-as-primary-key-in-entity.html
Browser other questions tagged asp.net-mvc entity-framework
You are not signed in. Login or sign up in order to post.
You are using EDMX?
– Leonel Sanches da Silva
That’s right, man
– Otávio Medeiros
You can take a picture of your diagram showing some of the entities that are losing the primary key?
– Leonel Sanches da Silva
I put the images... If you notice in my diagram have the User code as key, but in my codebehind is not as key, there every time I have to put it as key
– Otávio Medeiros
I know little of what the EDMX does alone, but my guess is the nomenclature that is out of his standard. The correct would be
UsuarioId
, and notUsuárioCodigo
. My suggestion, in fact, would be to abandon the EDMX and use the text-only Models, less prone to errors.– Leonel Sanches da Silva