I\'m making a website with MVC .NET.
Since I\'m an old school programmer who learn to design database first, I opted for the Database first approach. I\'m also using \"c
Don't edit the generated files. Ever. Just. Don't. Do. It.
Instead, make your edits in partial files in a different directory. To add attributes, declare a Metadata class at the top of your partial class definition.
[MetadataType(typeof(BlogMetadata))]
public partial class Blog
{
// it's possible to add logic and non-mapped properties here
}
Now in your Metadata class, you can define attributes or other logic:
public class BlahMetadata
{
[AllowHtml]
public string Content{ get; set; }
}