public static IMongoSessionContext Create()
        {
            IMongoDatabase database = MongoDatabaseFactory.Create();

            //var session = new MongoTransactionSession(database);

            return(new MongoSessionContext(database));
        }
Example #2
0
        //private static IUnitOfWork _unitOfWork;

        static Program()
        {
            _database  = MongoDatabaseFactory.Create();
            _dbContext = new SampleMongoDbContext(_database);
            CreateTestCollections();
            //var sessionDb = MongoDatabaseFactory.Create();
            //var transactionSession = new MongoTransactionSession(sessionDb);
            //_sessionDbContext = new MongoSessionContext(sessionDb, transactionSession);
            //_unitOfWork = new MongoUnitOfWork(transactionSession);
        }