public async Task <IActionResult> Putfollow_up_types([FromRoute] int id, [FromBody] follow_up_types follow_up_types) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != follow_up_types.id) { return(BadRequest()); } _context.Entry(follow_up_types).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!follow_up_typesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Postfollow_up_types([FromBody] follow_up_types follow_up_types) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.follow_up_types.Add(follow_up_types); await _context.SaveChangesAsync(); return(CreatedAtAction("Getfollow_up_types", new { id = follow_up_types.id }, follow_up_types)); }