Browse Source
Update MongoDbCoreRepositoryExtensions.cs
pull/7879/head
liangshiwei
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDbCoreRepositoryExtensions.cs
|
|
|
@ -59,7 +59,10 @@ namespace Volo.Abp.Domain.Repositories |
|
|
|
public static IMongoDbRepository<TEntity> ToMongoDbRepository<TEntity>(this IBasicRepository<TEntity> repository) |
|
|
|
where TEntity : class, IEntity |
|
|
|
{ |
|
|
|
if (repository is IMongoDbRepository<TEntity> mongoDbRepository) return mongoDbRepository; |
|
|
|
if (repository is IMongoDbRepository<TEntity> mongoDbRepository) |
|
|
|
{ |
|
|
|
return mongoDbRepository; |
|
|
|
} |
|
|
|
throw new ArgumentException("Given repository does not implement " + typeof(IMongoDbRepository<TEntity>).AssemblyQualifiedName, nameof(repository)); |
|
|
|
} |
|
|
|
} |
|
|
|
|