public async Task <IActionResult> PutRole(long id, Role role) { if (id != role.Id) { return(BadRequest()); } _context.Entry(role).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RoleExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task Save() { await _context.SaveChangesAsync(); }