public async Task <ActionResult <CallOutcomeMaster> > PostCallOutcomeMaster(CallOutcomeMaster callOutcomeMaster) { _context.CallOutcomeMaster.Add(callOutcomeMaster); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCallOutcomeMaster", new { id = callOutcomeMaster.OutComeId }, callOutcomeMaster)); }
public async Task <IActionResult> PutCallOutcomeMaster(int id, CallOutcomeMaster callOutcomeMaster) { if (id != callOutcomeMaster.OutComeId) { return(BadRequest()); } _context.Entry(callOutcomeMaster).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CallOutcomeMasterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }