public async Task <IHttpActionResult> PutSCOUTING2019(int id, SCOUTING2019 sCOUTING2019) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != sCOUTING2019.Id) { return(BadRequest()); } db.Entry(sCOUTING2019).State = EntityState.Modified; try { await db.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SCOUTING2019Exists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public async Task <IHttpActionResult> GetSCOUTING2019(int id) { SCOUTING2019 sCOUTING2019 = await db.SCOUTING2019.FindAsync(id); if (sCOUTING2019 == null) { return(NotFound()); } return(Ok(sCOUTING2019)); }
public async Task <IHttpActionResult> PostSCOUTING2019(SCOUTING2019 sCOUTING2019) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.SCOUTING2019.Add(sCOUTING2019); await db.SaveChangesAsync(); return(CreatedAtRoute("DefaultApi", new { id = sCOUTING2019.Id }, sCOUTING2019)); }
public async Task <IHttpActionResult> DeleteSCOUTING2019(int id) { SCOUTING2019 sCOUTING2019 = await db.SCOUTING2019.FindAsync(id); if (sCOUTING2019 == null) { return(NotFound()); } db.SCOUTING2019.Remove(sCOUTING2019); await db.SaveChangesAsync(); return(Ok(sCOUTING2019)); }