public ActionResult <Vet> Get(long id) { var service = new VetService(); var vet = service.GetID(id); if (vet == null) { return(NotFound()); } return(vet); }
public ActionResult Delete(long id) { var service = new VetService(); var vet = service.GetID(id); if (vet == null) { return(NotFound()); } service.Delete(vet); return(Ok()); }
public ActionResult <Vet> Put(long id, [FromBody] Vet vet) { var service = new VetService(); if (service.GetID(id) == null) { return(NotFound()); } vet.VetID = id; service.Store(vet); return(vet); }