// PUT api/TicketCutoffs/5 public async Task<IHttpActionResult> PutTicketCutoff(int id, TicketCutoff TicketCutoff) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (id != TicketCutoff.TicketCutoffID) { return BadRequest(); } await repository.UpdateAsync(TicketCutoff, TicketCutoff.TicketCutoffID); return StatusCode(HttpStatusCode.NoContent); }
public async Task<IHttpActionResult> PostTicketCutoff(TicketCutoff TicketCutoff) { if (!ModelState.IsValid) { return BadRequest(ModelState); } await repository.AddAsync(TicketCutoff); return CreatedAtRoute("DefaultApi", new { id = TicketCutoff.TicketCutoffID }, TicketCutoff); }