public ActionResult <Prescription> Post([FromBody] Prescription prescription) { var service = new PrescriptionService(); service.Store(prescription); return(prescription); }
public ActionResult <Prescription> Put(long id, [FromBody] Prescription prescription) { var service = new PrescriptionService(); if (service.GetID(id) == null) { return(NotFound()); } prescription.PrescriptionID = id; service.Store(prescription); return(prescription); }