// GET: Genero/Details/5 public ActionResult Details(Guid id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Genero genero = _generoAppService.ObterPorId(id); if (genero == null) { return(HttpNotFound()); } return(View(genero)); }
public async Task <IActionResult> GetGenero(Guid id) { var genero = await _generoAppService.ObterPorId(id); if (genero == null) { return(NotFound()); } return(Ok(genero)); }
// GET: api/Genero/5 public IHttpActionResult Get(Guid id) { try { return(Ok(_generoAppService.ObterPorId(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }