public ActionResult <Todo> Get()
 {
     try
     {
         return(Ok(_service.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemplo n.º 2
0
 public ActionResult <IEnumerable <Todo> > GetAll()
 {
     try
     {
         return(Ok(_cservice.GetAll()));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }