How to auto-generate the WCF RIA [Key] attribute
Posted: Mon 16 Jan 2012 11:58
Hi,
I posted this in the wrong forum earlier so am re-posting it here.
Using Entity Developer for nHibernate, 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" already. Note that currently the "Required" attribute is added to primary keys automatically but the "Key" attribute isn't.
The reason I want this is that Silverlight WCF RIA domain services needs it. I could add it manually but that's a bit of a hassle.
Thanks
I posted this in the wrong forum earlier so am re-posting it here.
Using Entity Developer for nHibernate, 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" already. Note that currently the "Required" attribute is added to primary keys automatically but the "Key" attribute isn't.
The reason I want this is that Silverlight WCF RIA domain services needs it. I could add it manually but that's a bit of a hassle.
Thanks