Auto add [Key] attribute to primary key field?
Posted: Sun 15 Jan 2012 12:09
Hi,
Is there a way to have the "Key" attribute automatically placed before the primary key properties in all my entities? I've set the "Validation Framework"="DataAnnotations" and note that the "Required" attribute is added to primary keys but the "Key" attribute isn't.
The reason I want it is that Silverlight RIA domain services needs it. I could add it manually but that's a bit of a hassle.
Thanks
Is there a way to have the "Key" attribute automatically placed before the primary key properties in all my entities? I've set the "Validation Framework"="DataAnnotations" and note that the "Required" attribute is added to primary keys but the "Key" attribute isn't.
The reason I want it is that Silverlight RIA domain services needs it. I could add it manually but that's a bit of a hassle.
Thanks