Пример #1
0
        internal static IRepository <Branch> GetRepo(string connectionString, string providerName)
        {
            Solution.DataAccess.DataModel.SubSonicTestDB db;
            if (String.IsNullOrEmpty(connectionString))
            {
                db = new Solution.DataAccess.DataModel.SubSonicTestDB();
            }
            else
            {
                db = new Solution.DataAccess.DataModel.SubSonicTestDB(connectionString, providerName);
            }
            IRepository <Branch> _repo;

            if (db.TestMode)
            {
                Branch.SetTestRepo();
                _repo = _testRepo;
            }
            else
            {
                _repo = new SubSonicRepository <Branch>(db);
            }
            return(_repo);
        }
Пример #2
0
 public Branch(string connectionString, string providerName)
 {
     _db = new Solution.DataAccess.DataModel.SubSonicTestDB(connectionString, providerName);
     Init();
 }
Пример #3
0
 public Branch()
 {
     _db = new Solution.DataAccess.DataModel.SubSonicTestDB();
     Init();
 }
Пример #4
0
 public Position()
 {
     _db = new Solution.DataAccess.DataModel.SubSonicTestDB();
     Init();
 }