public async Task <ActionResult <UsersInFl> > PostUsersInFl(UsersInFl usersInFl) { _context.UsersInFl.Add(usersInFl); await _context.SaveChangesAsync(); return(CreatedAtAction("GetUsersInFl", new { id = usersInFl.UflId }, usersInFl)); }
public async Task <IActionResult> PutUsersInFl(int id, UsersInFl usersInFl) { if (id != usersInFl.UflId) { return(BadRequest()); } _context.Entry(usersInFl).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsersInFlExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }