Ejemplo n.º 1
0
 public ActionResult <List <PetType> > GetFiltered(string name)
 {
     try
     {
         return(_petTypeService.GetAllByName(name));
     }
     catch (Exception e)
     {
         return(StatusCode(500, "Task failed successfully"));
     }
 }
Ejemplo n.º 2
0
        public ActionResult <List <PetType> > GetFilteredName(string type)
        {
            var pettypename = _petTypeService.GetAllByName(type);

            try
            {
                return(pettypename);
            }
            catch (Exception e)
            {
                return(StatusCode(500, "something went wrong"));
            }
        }