public async Task <ActionResult <List <Comentario> > > Get() { try{ return(await repositorio.Get()); }catch (Exception) { throw; } }
public async Task <ActionResult <List <Comentario> > > Get() { try { var listaComentarios = await repositorio.Get(); if (listaComentarios == null) { return(NotFound("Nenhum comentario encontrado")); } return(listaComentarios); } catch (Exception) { throw; } }