Advertisement
Galina841130

XML Model

Aug 6th, 2022
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Text;
  5.  
  6. namespace Footballers.DataProcessor.ImportDto
  7. {
  8. public class TeamJsonImportModel
  9. {
  10. public TeamJsonImportModel()
  11. {
  12. FootballersIds = new List<int>();
  13. }
  14. [Required]
  15. [StringLength(40, MinimumLength = 3)]
  16. [RegularExpression(@"^[A-Za-z0-9\s.-]+$")]
  17. public string Name { get; set; }
  18.  
  19. [Required]
  20. [StringLength(40, MinimumLength = 2)]
  21. public string Nationality { get; set; }
  22.  
  23. public int Trophies { get; set; }
  24. public IEnumerable<int> FootballersIds { get; set; }
  25. }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement