示例#1
0
 public ActionResult <IEnumerable <ProductDto> > GetByName([FromRoute] string name)
 {
     try
     {
         return(new ActionResult <IEnumerable <ProductDto> >(_productApplication.GetByName(name)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }