AjoutsAuxEntites.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace DAL {
  8. [MetadataType(typeof( Personne.PersonneMetadata ))]
  9. partial class Personne {
  10. private class PersonneMetadata {
  11. [Display(Name = "Identifiant")]
  12. public object Id;
  13. [Display( Name = "Civilité !" )]
  14. [Required( ErrorMessage = "{0} est obligatware !")]
  15. public object TitreId;
  16. [Required( ErrorMessage = "{0} est obligatware !")]
  17. [MaxLength( 50, ErrorMessage = "50 caractères maxi pour {0}" )]
  18. public string Nom { get; set; }
  19. [Display( Name = "Prénom" )]
  20. [Required( ErrorMessage = "{0} est obligatware !")]
  21. [MaxLength( 50, ErrorMessage = "50 caractères maxi pour {0}" )]
  22. public string Prenom { get; set; }
  23. [Display( Name = "Téléphone" )]
  24. [Required( ErrorMessage = "{0} est obligatware !")]
  25. [RegularExpression( "^0[1-9][0-9]{8}$", ErrorMessage = "C'est pas un téléphone, ça !" )]
  26. public string Telephone { get; set; }
  27. }
  28. }
  29. }