public async Task <ActionResult <Test1Result> > PostTest1Result(Test1Result test1Result) { _context.Test1Results.Add(test1Result); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTest1Result", new { id = test1Result.Id }, test1Result)); }
public async Task <IActionResult> PutTest1Result(long id, Test1Result test1Result) { if (id != test1Result.Id) { return(BadRequest()); } _context.Entry(test1Result).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Test1ResultExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }