|
|
@ -71,16 +71,18 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
|
|
|
|
|
|
protected Task<TMongoDbContext> GetDbContextAsync(CancellationToken cancellationToken = default) |
|
|
protected Task<TMongoDbContext> GetDbContextAsync(CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
// Multi-tenancy unaware entities should always use the host connection string
|
|
|
// Multi-tenancy unaware entities should always use the host connection string
|
|
|
if (!EntityHelper.IsMultiTenant<TEntity>()) |
|
|
if (!EntityHelper.IsMultiTenant<TEntity>()) |
|
|
{ |
|
|
{ |
|
|
using (CurrentTenant.Change(null)) |
|
|
using (CurrentTenant.Change(null)) |
|
|
{ |
|
|
{ |
|
|
return DbContextProvider.GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
return DbContextProvider.GetDbContextAsync(cancellationToken); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return DbContextProvider.GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
return DbContextProvider.GetDbContextAsync(cancellationToken); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected IMongoDbContextProvider<TMongoDbContext> DbContextProvider { get; } |
|
|
protected IMongoDbContextProvider<TMongoDbContext> DbContextProvider { get; } |
|
|
@ -107,9 +109,11 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool autoSave = false, |
|
|
bool autoSave = false, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
await ApplyAbpConceptsForAddedEntityAsync(entity); |
|
|
await ApplyAbpConceptsForAddedEntityAsync(entity); |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
if (dbContext.SessionHandle != null) |
|
|
if (dbContext.SessionHandle != null) |
|
|
@ -117,14 +121,14 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
await collection.InsertOneAsync( |
|
|
await collection.InsertOneAsync( |
|
|
dbContext.SessionHandle, |
|
|
dbContext.SessionHandle, |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
await collection.InsertOneAsync( |
|
|
await collection.InsertOneAsync( |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -133,6 +137,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
|
|
|
|
|
|
public override async Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) |
|
|
public override async Task InsertManyAsync(IEnumerable<TEntity> entities, bool autoSave = false, CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
var entityArray = entities.ToArray(); |
|
|
var entityArray = entities.ToArray(); |
|
|
|
|
|
|
|
|
foreach (var entity in entityArray) |
|
|
foreach (var entity in entityArray) |
|
|
@ -140,7 +146,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
await ApplyAbpConceptsForAddedEntityAsync(entity); |
|
|
await ApplyAbpConceptsForAddedEntityAsync(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
if (BulkOperationProvider != null) |
|
|
if (BulkOperationProvider != null) |
|
|
@ -169,6 +175,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool autoSave = false, |
|
|
bool autoSave = false, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
SetModificationAuditProperties(entity); |
|
|
SetModificationAuditProperties(entity); |
|
|
|
|
|
|
|
|
if (entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted) |
|
|
if (entity is ISoftDelete softDeleteEntity && softDeleteEntity.IsDeleted) |
|
|
@ -186,7 +194,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); |
|
|
var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); |
|
|
ReplaceOneResult result; |
|
|
ReplaceOneResult result; |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
if (dbContext.SessionHandle != null) |
|
|
if (dbContext.SessionHandle != null) |
|
|
@ -195,7 +203,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
dbContext.SessionHandle, |
|
|
dbContext.SessionHandle, |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
@ -203,7 +211,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
result = await collection.ReplaceOneAsync( |
|
|
result = await collection.ReplaceOneAsync( |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -277,15 +285,18 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool autoSave = false, |
|
|
bool autoSave = false, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
await ApplyAbpConceptsForDeletedEntityAsync(entity); |
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); |
|
|
|
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
if (entity is ISoftDelete softDeleteEntity && !IsHardDeleted(entity)) |
|
|
var oldConcurrencyStamp = SetNewConcurrencyStamp(entity); |
|
|
|
|
|
|
|
|
|
|
|
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) |
|
|
{ |
|
|
{ |
|
|
softDeleteEntity.IsDeleted = true; |
|
|
((ISoftDelete)entity).IsDeleted = true; |
|
|
|
|
|
await ApplyAbpConceptsForDeletedEntityAsync(entity); |
|
|
|
|
|
|
|
|
ReplaceOneResult result; |
|
|
ReplaceOneResult result; |
|
|
|
|
|
|
|
|
if (dbContext.SessionHandle != null) |
|
|
if (dbContext.SessionHandle != null) |
|
|
@ -294,7 +305,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
dbContext.SessionHandle, |
|
|
dbContext.SessionHandle, |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
@ -302,7 +313,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
result = await collection.ReplaceOneAsync( |
|
|
result = await collection.ReplaceOneAsync( |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
entity, |
|
|
entity, |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -313,6 +324,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
|
|
|
await ApplyAbpConceptsForDeletedEntityAsync(entity); |
|
|
|
|
|
|
|
|
DeleteResult result; |
|
|
DeleteResult result; |
|
|
|
|
|
|
|
|
if (dbContext.SessionHandle != null) |
|
|
if (dbContext.SessionHandle != null) |
|
|
@ -320,14 +333,14 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
result = await collection.DeleteOneAsync( |
|
|
result = await collection.DeleteOneAsync( |
|
|
dbContext.SessionHandle, |
|
|
dbContext.SessionHandle, |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
cancellationToken: GetCancellationToken(cancellationToken) |
|
|
cancellationToken: cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
result = await collection.DeleteOneAsync( |
|
|
result = await collection.DeleteOneAsync( |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
CreateEntityFilter(entity, true, oldConcurrencyStamp), |
|
|
GetCancellationToken(cancellationToken) |
|
|
cancellationToken |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -343,55 +356,55 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool autoSave = false, |
|
|
bool autoSave = false, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
var softDeletedEntities = new List<TEntity>(); |
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
|
|
|
var softDeletedEntities = new Dictionary<TEntity, string>(); |
|
|
var hardDeletedEntities = new List<TEntity>(); |
|
|
var hardDeletedEntities = new List<TEntity>(); |
|
|
|
|
|
|
|
|
foreach (var entity in entities) |
|
|
foreach (var entity in entities) |
|
|
{ |
|
|
{ |
|
|
await ApplyAbpConceptsForDeletedEntityAsync(entity); |
|
|
|
|
|
SetNewConcurrencyStamp(entity); |
|
|
|
|
|
|
|
|
|
|
|
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) |
|
|
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)) && !IsHardDeleted(entity)) |
|
|
{ |
|
|
{ |
|
|
softDeletedEntities.Add(entity); |
|
|
((ISoftDelete)entity).IsDeleted = true; |
|
|
|
|
|
|
|
|
|
|
|
softDeletedEntities.Add(entity, SetNewConcurrencyStamp(entity)); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
hardDeletedEntities.Add(entity); |
|
|
hardDeletedEntities.Add(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await ApplyAbpConceptsForDeletedEntityAsync(entity); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(GetCancellationToken(cancellationToken)); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
if (BulkOperationProvider != null) |
|
|
if (BulkOperationProvider != null) |
|
|
{ |
|
|
{ |
|
|
await BulkOperationProvider.DeleteManyAsync(this, entities.ToArray(), dbContext.SessionHandle, autoSave, cancellationToken); |
|
|
await BulkOperationProvider.DeleteManyAsync(this, entities, dbContext.SessionHandle, autoSave, cancellationToken); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (softDeletedEntities.Count > 0) |
|
|
if (softDeletedEntities.Count > 0) |
|
|
{ |
|
|
{ |
|
|
UpdateResult updateResult; |
|
|
BulkWriteResult updateResult; |
|
|
var softDeleteEntitiesCount = softDeletedEntities.Count; |
|
|
|
|
|
|
|
|
var replaceRequests = new List<WriteModel<TEntity>>( |
|
|
|
|
|
softDeletedEntities.Select(entity => new ReplaceOneModel<TEntity>( |
|
|
|
|
|
CreateEntityFilter(entity.Key, true, entity.Value), entity.Key)) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
if (dbContext.SessionHandle != null) |
|
|
if (dbContext.SessionHandle != null) |
|
|
{ |
|
|
{ |
|
|
updateResult = await collection.UpdateManyAsync( |
|
|
updateResult = await collection.BulkWriteAsync(dbContext.SessionHandle, replaceRequests, cancellationToken: cancellationToken); |
|
|
dbContext.SessionHandle, |
|
|
|
|
|
CreateEntitiesFilter(softDeletedEntities), |
|
|
|
|
|
Builders<TEntity>.Update.Set(x => ((ISoftDelete)x).IsDeleted, true) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
updateResult = await collection.UpdateManyAsync( |
|
|
updateResult = await collection.BulkWriteAsync(replaceRequests, cancellationToken: cancellationToken); |
|
|
CreateEntitiesFilter(softDeletedEntities), |
|
|
|
|
|
Builders<TEntity>.Update.Set(x => ((ISoftDelete)x).IsDeleted, true) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (updateResult.MatchedCount < softDeleteEntitiesCount) |
|
|
if (updateResult.MatchedCount < softDeletedEntities.Count) |
|
|
{ |
|
|
{ |
|
|
ThrowOptimisticConcurrencyException(); |
|
|
ThrowOptimisticConcurrencyException(); |
|
|
} |
|
|
} |
|
|
@ -406,14 +419,14 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
{ |
|
|
{ |
|
|
deleteResult = await collection.DeleteManyAsync( |
|
|
deleteResult = await collection.DeleteManyAsync( |
|
|
dbContext.SessionHandle, |
|
|
dbContext.SessionHandle, |
|
|
CreateEntitiesFilter(hardDeletedEntities) |
|
|
CreateEntitiesFilter(hardDeletedEntities), |
|
|
); |
|
|
cancellationToken: cancellationToken); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
deleteResult = await collection.DeleteManyAsync( |
|
|
deleteResult = await collection.DeleteManyAsync( |
|
|
CreateEntitiesFilter(hardDeletedEntities) |
|
|
CreateEntitiesFilter(hardDeletedEntities), |
|
|
); |
|
|
cancellationToken: cancellationToken); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (deleteResult.DeletedCount < hardDeletedEntitiesCount) |
|
|
if (deleteResult.DeletedCount < hardDeletedEntitiesCount) |
|
|
@ -462,10 +475,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
.Where(predicate) |
|
|
.Where(predicate) |
|
|
.ToListAsync(cancellationToken); |
|
|
.ToListAsync(cancellationToken); |
|
|
|
|
|
|
|
|
foreach (var entity in entities) |
|
|
await DeleteManyAsync(entities, autoSave, cancellationToken); |
|
|
{ |
|
|
|
|
|
await DeleteAsync(entity, autoSave, cancellationToken); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Obsolete("Use GetQueryableAsync method.")] |
|
|
[Obsolete("Use GetQueryableAsync method.")] |
|
|
@ -484,9 +494,11 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool includeDetails = true, |
|
|
bool includeDetails = true, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
.Where(predicate) |
|
|
.Where(predicate) |
|
|
.SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); |
|
|
.SingleOrDefaultAsync(cancellationToken); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Obsolete("Use GetMongoQueryableAsync method.")] |
|
|
[Obsolete("Use GetMongoQueryableAsync method.")] |
|
|
@ -501,6 +513,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
|
|
|
|
|
|
public async Task<IMongoQueryable<TEntity>> GetMongoQueryableAsync(CancellationToken cancellationToken = default) |
|
|
public async Task<IMongoQueryable<TEntity>> GetMongoQueryableAsync(CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
var collection = dbContext.Collection<TEntity>(); |
|
|
|
|
|
|
|
|
@ -513,6 +527,8 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
|
|
|
|
|
|
public async Task<IAggregateFluent<TEntity>> GetAggregateAsync(CancellationToken cancellationToken = default) |
|
|
public async Task<IAggregateFluent<TEntity>> GetAggregateAsync(CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|
|
|
cancellationToken = GetCancellationToken(cancellationToken); |
|
|
|
|
|
|
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var dbContext = await GetDbContextAsync(cancellationToken); |
|
|
var collection = await GetCollectionAsync(cancellationToken); |
|
|
var collection = await GetCollectionAsync(cancellationToken); |
|
|
|
|
|
|
|
|
@ -695,13 +711,13 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
[Obsolete("This method will be removed in future versions.")] |
|
|
[Obsolete("This method will be removed in future versions.")] |
|
|
public IAsyncCursor<TEntity> ToCursor(CancellationToken cancellationToken = new CancellationToken()) |
|
|
public IAsyncCursor<TEntity> ToCursor(CancellationToken cancellationToken = new CancellationToken()) |
|
|
{ |
|
|
{ |
|
|
return GetMongoQueryable().ToCursor(cancellationToken); |
|
|
return GetMongoQueryable().ToCursor(GetCancellationToken(cancellationToken)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[Obsolete("This method will be removed in future versions.")] |
|
|
[Obsolete("This method will be removed in future versions.")] |
|
|
public Task<IAsyncCursor<TEntity>> ToCursorAsync(CancellationToken cancellationToken = new CancellationToken()) |
|
|
public Task<IAsyncCursor<TEntity>> ToCursorAsync(CancellationToken cancellationToken = new CancellationToken()) |
|
|
{ |
|
|
{ |
|
|
return GetMongoQueryable().ToCursorAsync(cancellationToken); |
|
|
return GetMongoQueryable().ToCursorAsync(GetCancellationToken(cancellationToken)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -724,7 +740,7 @@ namespace Volo.Abp.Domain.Repositories.MongoDB |
|
|
bool includeDetails = true, |
|
|
bool includeDetails = true, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
var entity = await FindAsync(id, includeDetails, cancellationToken); |
|
|
var entity = await FindAsync(id, includeDetails, GetCancellationToken(cancellationToken)); |
|
|
|
|
|
|
|
|
if (entity == null) |
|
|
if (entity == null) |
|
|
{ |
|
|
{ |
|
|
|