Cannot declare unconventional PK via Data Annotations for a MVC3 Entity Model?

This shouldn't be necessary, I have a class User with the primary key defined as follows.

One other thing, a scalar property is "A property of an entity that maps to a single field in a storage schema", so it should not be a problem to try and use a string property as the PK. Not a very helpful remark, I know, but it sort of indicates that there's something else going on.

Just a detail: for some reason the property marked as Key is not getting exposed e.g. When you access the Controller at localhost:XXXX/Foobars you can't give Foo a value. – Nano Taboada Apr 18 '11 at 15:11 1 And does the Foobar table have a Foo PK in the database? – Sergi Papaseit Apr 18 '11 at 15:13 I haven't checked really what has been written to the persistence as I'm using the Code-First approach but I'll do that -- thanks!

– Nano Taboada Apr 26 '11 at 19:51.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions