Browse Source

Update modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs

made the simpler delete method

Co-authored-by: Qingxiao Ren <rqx110@163.com>
pull/14514/head
malik masis 4 years ago
committed by GitHub
parent
commit
621cbd1d64
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs

7
modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/EfCoreFeatureValueRepository.cs

@ -56,11 +56,6 @@ public class EfCoreFeatureValueRepository : EfCoreRepository<IFeatureManagementD
string providerKey,
CancellationToken cancellationToken = default)
{
var entities = await (await GetDbSetAsync())
.Where(
s => s.ProviderName == providerName && s.ProviderKey == providerKey
).ToListAsync(GetCancellationToken(cancellationToken));
(await GetDbSetAsync()).RemoveRange(entities);
await (await GetDbContextAsync()).SaveChangesAsync(cancellationToken);
await DeleteAsync(s => s.ProviderName == providerName && s.ProviderKey == providerKey, cancellationToken: GetCancellationToken(cancellationToken));
}
}

Loading…
Cancel
Save