public async Task <int> AddAsync(Office office) { _context.Add(office); await _context.SaveChangesAsync(); return(office.Id); }
public async Task UpdateDoorPermissionsAsync(UpdateDoorPermissionsModel permissions) { _context.DoorPermissions.RemoveRange(permissions.ToDelete); _context.DoorPermissions.AddRange(permissions.ToAdd); await _context.SaveChangesAsync(); }