public async Task <IActionResult> PutFeeDuesSmsdates([FromRoute] int id, [FromBody] FeeDuesSmsdates feeDuesSmsdates) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != feeDuesSmsdates.AutoId) { return(BadRequest()); } _context.Entry(feeDuesSmsdates).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeeDuesSmsdatesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostFeeDuesSmsdates([FromBody] FeeDuesSmsdates feeDuesSmsdates) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.FeeDuesSmsdates.Add(feeDuesSmsdates); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFeeDuesSmsdates", new { id = feeDuesSmsdates.AutoId }, feeDuesSmsdates)); }