public async Task <IActionResult> PutTms_ClientInformation(int id, Tms_ClientInformation tms_ClientInformation) { if (id != tms_ClientInformation.ClientNumber) { return(BadRequest()); } _context.Entry(tms_ClientInformation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Tms_ClientInformationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Tms_ClientInformation> > PostTms_ClientInformation(Tms_ClientInformation tms_ClientInformation) { _context.ClientInformation.Add(tms_ClientInformation); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (Tms_ClientInformationExists(tms_ClientInformation.ClientNumber)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetTms_ClientInformation", new { id = tms_ClientInformation.ClientNumber }, tms_ClientInformation)); }