Advertisement
Ciwan

Author Model

Dec 22nd, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using QuotesDomain.CustomValidators;
  7.  
  8. namespace QuotesDomain.Entities
  9. {
  10.     public class Author
  11.     {
  12.         [Key]
  13.         public int Id { get; set; }
  14.         [Required, MaxLength(30), MinLength(2)]
  15.         public string FirstName { get; set; }
  16.         [Required, MaxLength(30), MinLength(2)]
  17.         public string LastName { get; set; }
  18.         [Required]
  19.         public string UrlFriendlyName { get; set; }
  20.         [Required, ValidateDODDOB]
  21.         public string DOB { get; set; }
  22.         [ValidateDODDOB]
  23.         public string DOD { get; set; }
  24.         [Required, MaxLength(60), MinLength(2)]
  25.         public string Occupation { get; set; }
  26.         [Required, MaxLength(170), MinLength(5)]
  27.         public string WikiLink { get; set; }
  28.         public byte[] Image { get; set; }
  29.         [Required]
  30.         public bool isApproved { get; set; }
  31.         [Required]
  32.         public DateTime CreatedOn { get; set; }
  33.         public virtual ICollection<Quote> Quotes { get; set; }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement