public async Task <IHttpActionResult> PutNomLineCheckForms(int id, NomLineCheckForms nomLineCheckForms) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != nomLineCheckForms.Id) { return(BadRequest()); } db.Entry(nomLineCheckForms).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NomLineCheckFormsExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> GetNomLineCheckForms(int id) { NomLineCheckForms nomLineCheckForms = await db.NomLineCheckForms.FindAsync(id); if (nomLineCheckForms == null) { return(NotFound()); } return(Ok(nomLineCheckForms)); }
public async Task <IHttpActionResult> PostNomLineCheckForms(NomLineCheckForms nomLineCheckForms) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.NomLineCheckForms.Add(nomLineCheckForms); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = nomLineCheckForms.Id }, nomLineCheckForms)); }
public async Task <IHttpActionResult> DeleteNomLineCheckForms(int id) { NomLineCheckForms nomLineCheckForms = await db.NomLineCheckForms.FindAsync(id); if (nomLineCheckForms == null) { return(NotFound()); } db.NomLineCheckForms.Remove(nomLineCheckForms); await db.SaveChangesAsync(); return(Ok(nomLineCheckForms)); }