Guest User

Untitled

a guest
Jun 13th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public class ParentModel
  2. {
  3. public string Name { get; set; }
  4.  
  5. public ChildModel[] Items
  6. }
  7.  
  8. public class ChildModel
  9. {
  10. [MinLength(1, ErrorMessage = "At least 1 value needed.")]
  11. public int[] Values
  12. }
  13.  
  14. public async Task<IHttpActionResult> Post(ParentModel model)
  15. {
  16. if (!ModelState.IsValid)
  17. return BadRequest(ModelState);
  18. }
Add Comment
Please, Sign In to add comment