public ActionResult <List <PetType> > GetFiltered(string name) { try { return(_petTypeService.GetAllByName(name)); } catch (Exception e) { return(StatusCode(500, "Task failed successfully")); } }
public ActionResult <List <PetType> > GetFilteredName(string type) { var pettypename = _petTypeService.GetAllByName(type); try { return(pettypename); } catch (Exception e) { return(StatusCode(500, "something went wrong")); } }