public async Task <ActionResult <Sim_Info> > PostSim_Info(Sim_Info sim_Info) { _context.Sim_Info.Add(sim_Info); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetSim_Info), new { id = sim_Info.Sim_InfoId }, sim_Info)); }
public async Task <IActionResult> PutSim_Info(int id, Sim_Info sim_Info) { if (id != sim_Info.Sim_InfoId) { return(BadRequest()); } _context.Entry(sim_Info).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Sim_InfoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }