public async Task <IActionResult> PutTestCategoryMaster(int id, TestCategoryMaster testCategoryMaster) { if (id != testCategoryMaster.Id) { return(BadRequest()); } _context.Entry(testCategoryMaster).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TestCategoryMasterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TestCategoryMaster> > PostTestCategoryMaster(TestCategoryMaster testCategoryMaster) { _context.TestCategoryMasters.Add(testCategoryMaster); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTestCategoryMaster", new { id = testCategoryMaster.Id }, testCategoryMaster)); }