Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
 public MongoDbDatabaseApi(IAbpMongoDbContext dbContext)
 {
     DbContext = dbContext;
 }