var errors = ModelState.Values.SelectMany(v => v.Errors);
public class Document { [Key] public int Id { get; set; } [Required] [Display(Name = "Nome")] public string Name { get; set; } [Display(Name = "Descrição")] public string Description { get; set; } [Display(Name = "Arquivo")] public string Path { get; set; } [Required] [Display(Name = "Categoria")] [Range(1, int.MaxValue, ErrorMessage = "Selecione uma categoria válida.")] public DocumentCategory Category { get; set; } [Display(Name="Privado")] public bool isPrivate { get; set; } public DateTime? InsertDate { get; set; } public DateTime? UpdateDate { get; set; } [Display(Name = "Playlist")] public int? PlaylistID { get; set; } [Display(Name = "Album")] public int? AlbumID { get; set; } public virtual Album Album { get; set; } public virtual Playlist Playlist { get; set; } public virtual MyUser User { get; set; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)