public async Task <IActionResult> PutBProcessStep([FromRoute] int id, [FromBody] BProcessStep bProcessStep) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != bProcessStep.StepId) { return(BadRequest()); } _context.Entry(bProcessStep).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BProcessStepExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostBProcessStep([FromBody] BProcessStep bProcessStep) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.BProcessStep.Add(bProcessStep); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBProcessStep", new { id = bProcessStep.StepId }, bProcessStep)); }