예제 #1
0
        public async Task DeleteAsync(IEnumerable <CarModel> items)
        {
            var set       = _dbContext.Set <Car>().ToList();
            var originals = set.Where(item => items.Any(car => car.Key.Equals(item.Identifier))).ToList();

            _dbContext.RemoveRange(originals);
            await _dbContext.SaveChangesAsync();
        }