public async Task <IActionResult> PutLateConFee([FromRoute] int id, [FromBody] LateConFee lateConFee) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != lateConFee.AutoId) { return(BadRequest()); } _context.Entry(lateConFee).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LateConFeeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostLateConFee([FromBody] LateConFee lateConFee) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.LateConFee.Add(lateConFee); await _context.SaveChangesAsync(); return(CreatedAtAction("GetLateConFee", new { id = lateConFee.AutoId }, lateConFee)); }