public async Task <IActionResult> PutInstituitions_has_Users(int id, Instituitions_has_Users instituitions_has_Users) { if (id != instituitions_has_Users.Id) { return(BadRequest()); } _context.Entry(instituitions_has_Users).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Instituitions_has_UsersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Instituitions_has_Users> > PostInstituitions_has_Users(Instituitions_has_Users instituitions_has_Users) { _context.Instituitions_has_Users.Add(instituitions_has_Users); await _context.SaveChangesAsync(); return(CreatedAtAction("GetInstituitions_has_Users", new { id = instituitions_has_Users.Id }, instituitions_has_Users)); }