Esempio n. 1
0
 public void Dispose()
 {
     if (DatabaseSelection.DatabaseType == DbType.Mongo())
     {
         _mongoContext.Dispose();
     }
     else
     {
     }
 }
Esempio n. 2
0
 public int Save()
 {
     if (DatabaseSelection.DatabaseType == DbType.Mongo())
     {
         return(1);
     }
     else
     {
         return(0);
     }
 }
Esempio n. 3
0
 public UnitOfWork()
 {
     if (DatabaseSelection.DatabaseType == DbType.Mongo())
     {
         _mongoContext = new MongoContext();
         LoginUsers    = new LoginUsersMongoRepository(_mongoContext);
         Products      = new ProductsMongoRepository(_mongoContext);
         Baskets       = new BasketsMongoRepository(_mongoContext);
     }
     else
     {
     }
 }