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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
6 deletions
-
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)); |
|
|
|
} |
|
|
|
} |
|
|
|
|