public async Task <ActionResult <CallLocDesc> > PostCallLocDesc(CallLocDesc callLocDesc) { _context.CallLocDescs.Add(callLocDesc); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCallLocDesc", new { id = callLocDesc.CallLocId }, callLocDesc)); }
public async Task <IActionResult> PutCallLocDesc(int id, CallLocDesc callLocDesc) { if (id != callLocDesc.CallLocId) { return(BadRequest()); } _context.Entry(callLocDesc).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CallLocDescExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }