public async Task <IActionResult> PutMSSStrategyModel(MSSStrategyModel mssStrategyModel) { int id = mssStrategyModel.MSSStrategyModelId; if (id != mssStrategyModel.MSSStrategyModelId) { return(BadRequest()); } _context.Entry(mssStrategyModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MSSStrategyModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <MSSStrategyModel> > PostAddRuleModel(MSSStrategyModel mssStrategyModel) { try { _context.MSSStrategyModels.Add(mssStrategyModel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMSSStrategyModel", new { id = mssStrategyModel.MSSStrategyModelId }, mssStrategyModel)); } catch (System.Exception exe) { return(BadRequest(exe.Message)); } }