예제 #1
0
        public async Task <int> AddAsync(Office office)
        {
            _context.Add(office);
            await _context.SaveChangesAsync();

            return(office.Id);
        }
예제 #2
0
        public async Task UpdateDoorPermissionsAsync(UpdateDoorPermissionsModel permissions)
        {
            _context.DoorPermissions.RemoveRange(permissions.ToDelete);
            _context.DoorPermissions.AddRange(permissions.ToAdd);

            await _context.SaveChangesAsync();
        }