public ActionResult <BookRequest> Get([FromQuery] BookRequest request) { if (!ModelState.IsValid) { return(BadRequest()); } var result = _mapper.Map <IEnumerable <BookResponse> >(_bookAppService.GetBooks(request)); if (!result.Any()) { return(NoContent()); } return(Ok(result)); }
public IHttpActionResult GetAllBooks(string bookType, bool isNew, bool isUpcoming, bool isSuperOpportunity, string search) { var x = _bookAppService.GetBooks(bookType, isNew, isUpcoming, isSuperOpportunity, search); return(Ok(x)); }