public async Task <ActionResult <TbSection1> > PostTbSection1(TbSection1 tbSection1) { _context.TbSection1.Add(tbSection1); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTbSection1", new { id = tbSection1.Section1Id }, tbSection1)); }
public async Task <IActionResult> PutTbSection1(int id, TbSection1 tbSection1) { if (id != tbSection1.Section1Id) { return(BadRequest()); } _context.Entry(tbSection1).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TbSection1Exists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }