Is there a way I can have a generated code file like so:
public partial class A
{
public string a { get; set; }
}
and then in another file:
public partial class A
{
[Attribute("etc")]
public string a { get; set; }
}
So that I can have a class generated from the database and then use a non-generated file to mark it up?
I’ve seen something like this done in an article by Scott Guthrie (near the end of it) – didn’t try it myself, though.
http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx