コード例 #1
0
 public ActionResult <Imposto> Get([FromServices] ImpostoDAO dao, int id)
 {
     try
     {
         return(dao.Get(id));
     }
     catch (Exception e) {
         return(new StatusCodeResult(400));
     }
 }
コード例 #2
0
 public ActionResult <IEnumerable <Imposto> > Get([FromServices] ImpostoDAO dao)
 {
     try
     {
         return(dao.Get().ToList());
     }
     catch (Exception e) {
         return(new StatusCodeResult(400));
     }
 }