public IActionResult Get() { try { var autor = _repository.Get(); return(new ObjectResult(autor)); }catch (Exception e) { return(StatusCode(500, new { erro = "Falha no servidor! Tente novamente mais tarde" })); } }
public ActionResult Index() { var autores = repository.Get(); return(View(autores)); }
public IEnumerable <AutorDto> SearchByName(string text) { return(Map(_repository.Get(w => w.AutorName.Contains(text)))); }
public Autor Get(int id) { return(_autorRepository.Get(id)); }
public IHttpActionResult Get(int?id = null) { return(Ok(_autorRepository.Get())); }