public IHttpActionResult PostDrugPerscription(DrugPerscription drugPerscription)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.DrugPerscriptions.Add(drugPerscription);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (DrugPerscriptionExists(drugPerscription.DrugPerscriptionID))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

            return CreatedAtRoute("DefaultApi", new { id = drugPerscription.DrugPerscriptionID }, drugPerscription);
        }
        public IHttpActionResult PutDrugPerscription(int id, DrugPerscription drugPerscription)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != drugPerscription.DrugPerscriptionID)
            {
                return BadRequest();
            }

            db.Entry(drugPerscription).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!DrugPerscriptionExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }