public ActionResult <IEnumerable <Pet> > Get([FromQuery] Filter filter) { if (filter.CurrentPage == 0 && filter.ItemsPrPage == 0) { return(Ok(_petService.GetAllPets())); } return(Ok(_petService.GetFilteredPets(filter))); }
public ActionResult <IEnumerable <Pet> > Get([FromQuery] Filter filter) { try { return(Ok(_petShopService.GetFilteredPets(filter))); //return _petShopService.GetAllPetsServ(); } catch (Exception ex) { return(BadRequest(ex.Message)); } }