internal Fries GetById(int id) { var exists = _repo.GetById(id); if (exists == null) { throw new Exception("Invalid Id"); } return(exists); }
public Fries GetById(int id) { Fries foundFries = _fr.GetById(id); if (foundFries == null) { throw new Exception("There is no fries with that id"); } return(foundFries); }
public Fries GetFriesById([FromRoute] int id) { return(_repo.GetById(id)); }