public IActionResult Get([FromServices] IBookBusiness bookBusiness, [FromServices] IMapper mapper) { var resultDomain = bookBusiness.FindAll(); var resultVO = mapper.Map <List <BookValue> >(resultDomain); return(Ok(resultVO)); }
public IActionResult Get() { return(Ok(_bookBusiness.FindAll().Select(x => (BookVO)GetUrl.GerarLinks( x, nameof(Get), this.HttpContext, _linkGenerator)))); }
public IActionResult Get() { var result = _bookBusiness.FindAll(); if (result == null) { return(BadRequest()); } return(Ok(result)); }
public IActionResult Get() { try { var lista = _bookBusiness.FindAll(); return(Ok(lista)); } catch (Exception ex) { throw ex; } }
// [AllowAnonymous] public IActionResult Get() { List <BookVO> books = new List <BookVO>(); books = _bookBusiness.FindAll(); if (books == null) { return(BadRequest()); } foreach (var item in books) { item.Imagem = _bookRepository.GetImagBook(item); } return(Ok(books)); }
public IActionResult Get() { try { List <Book> books = new List <Book>(_bookBusiness.FindAll()); if (books != null) { return(Ok(books)); } else { return(NotFound()); } } catch (Exception) { return(BadRequest()); } }
[TypeFilter(typeof(HyperMediaFilter))] // Anotação para o HATEOAS public IActionResult Get() { return(Ok(_bookBusiness.FindAll())); }
public IActionResult Get() { return(new OkObjectResult(_bookBusiness.FindAll())); }
public IActionResult Get() { var res = _booksBusiness.FindAll(); return(Ok(res)); }
public ActionResult <IEnumerable <string> > Get() { return(Ok(_bookBusiness.FindAll())); }
public IActionResult Get() { var books = _bookBusiness.FindAll(); return(Ok(books)); }
public IActionResult Get() { return(Ok(_personBusiness.FindAll())); }