Advertisement
Iv555

Untitled

Aug 6th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. using Footballers.Data.Models.Enums;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Text;
  6. using System.Xml.Serialization;
  7.  
  8. namespace Footballers.DataProcessor.ImportDto
  9. {
  10. [XmlType("Coach")]
  11. public class CoachWithFootballersInputModel
  12. {
  13. [XmlElement("Name")]
  14. [Required]
  15. [StringLength(40, MinimumLength = 2)]
  16. public string Name { get; set; }
  17.  
  18. [XmlElement("Nationality")]
  19. [Required]
  20. public string Nationality { get; set; }
  21.  
  22. [XmlArray("Footballers")]
  23. public FootballerOfCoachInputModel[] Footballers { get; set; }
  24. }
  25. [XmlType("Footballer")]
  26. public class FootballerOfCoachInputModel
  27. {
  28. [Required]
  29. [StringLength(40, MinimumLength =2)]
  30. [XmlElement("Name")]
  31. public string Name { get; set; }
  32.  
  33. [Required]
  34. [XmlElement("ContractStartDate")]
  35. public string ContractStartDate { get; set; }
  36.  
  37. [Required]
  38. [XmlElement("ContractEndDate")]
  39. public string ContractEndDate { get; set; }
  40.  
  41.  
  42. [Required]
  43. [XmlElement("BestSkillType")]
  44. [EnumDataType(typeof(BestSkillType))]
  45. public string BestSkillType { get; set; }
  46.  
  47. [Required]
  48. [XmlElement("PositionType")]
  49. [EnumDataType(typeof(PositionType))]
  50. public string PositionType { get; set; }
  51.  
  52. }
  53. }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement