Guest User

Untitled

a guest
Jul 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. [HttpGet("{filter:Filter}")]
  2. [SwaggerResponse(HttpStatusCode.OK, typeof(BatchesResponse))]
  3. [SwaggerResponse(HttpStatusCode.BadRequest, typeof(ModelStateDictionary))]
  4. public async Task<ActionResult> List(Filter filter)
  5. {
  6. if (!ModelState.IsValid)
  7. return BadRequest(ModelState);
  8.  
  9. var result = _repository.GetAll();
  10. return Ok(new BatchesResponse(result));
  11. }
  12.  
  13. System.InvalidOperationException: The constraint entry 'filter' - 'Filter' on the route 'api/{ver:apiVersion}/Batches/{filter:Filter}' could not be resolved by the constraint resolver of type 'DefaultInlineConstraintResolver'.
Add Comment
Please, Sign In to add comment