public static AbpMongoDbContext ToAbpMongoDbContext(this IAbpMongoDbContext dbContext) { var abpMongoDbContext = dbContext as AbpMongoDbContext; if (abpMongoDbContext == null) { throw new AbpException($"The type {dbContext.GetType().AssemblyQualifiedName} should be convertable to {typeof(AbpMongoDbContext).AssemblyQualifiedName}!"); } return(abpMongoDbContext); }
public MongoDbDatabaseApi(IAbpMongoDbContext dbContext) { DbContext = dbContext; }