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