public IHttpActionResult PutClinicTable(int id, ClinicTable clinicTable) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != clinicTable.Id) { return(BadRequest()); } db.Entry(clinicTable).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!ClinicTableExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult GetClinicTable(int id) { ClinicTable clinicTable = db.ClinicTables.Find(id); if (clinicTable == null) { return(NotFound()); } return(Ok(clinicTable)); }
public IHttpActionResult PostClinicTable(ClinicTable clinicTable) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.ClinicTables.Add(clinicTable); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = clinicTable.Id }, clinicTable)); }
public void Remove(ClinicTable entity) { _context.Clinicians.Remove(entity); }
public void Modify(ClinicTable entity) { _context.Clinicians.Attach(entity); _context.Entry(entity).State = EntityState.Modified; }
public int Add(ClinicTable entity) { _context.Clinicians.Add(entity); return(entity.Identifier); }
public void Remove(ClinicTable entity) { _repo.Remove(entity); }
public void Modify(ClinicTable entity) { _repo.Modify(entity); }
public int Add(ClinicTable entity) { return(_repo.Add(entity)); }