Bulldog13
Golden Member
I am writing DataAnnotations for my models in my MVC program. After doing pretty much the same thing for the third model, I can't help but wonder is there an easier way to do this?
Does anyone know of any addons or plugins for Visual Studio that would allow you to select a Model or ViewModel and use a GUI to define all of this stuff (in a separate Metadata class)?
Code:
[MetadataType(typeof(ArticleMD))]
public partial class Article
{
public class ArticleMD
{
[DisplayName("Created By:")]
public string CreatedBy { get; set; }
[DisplayName("Additional Information:")]
[DataType(DataType.MultilineText)]
public string AdditionalInformation { get; set; }
[DisplayName("Title:")]
[Required]
public string Title { get; set; }
//...
Does anyone know of any addons or plugins for Visual Studio that would allow you to select a Model or ViewModel and use a GUI to define all of this stuff (in a separate Metadata class)?