Exemple #1
0
        internal static IRepository<Category> GetRepo(string connectionString, string providerName)
        {
            Hana.Model.NorthwindDB db;
            if(String.IsNullOrEmpty(connectionString)){
                db=new Hana.Model.NorthwindDB();
            }else{
                db=new Hana.Model.NorthwindDB(connectionString, providerName);
            }
            IRepository<Category> _repo;

            if(db.TestMode){
                Category.SetTestRepo();
                _repo=_testRepo;
            }else{
                _repo = new SubSonicRepository<Category>(db);
            }
            return _repo;
        }
Exemple #2
0
 public Category()
 {
     _db=new Hana.Model.NorthwindDB();
     Init();
 }
Exemple #3
0
 public Category(string connectionString, string providerName)
 {
     _db=new Hana.Model.NorthwindDB(connectionString, providerName);
     Init();
 }
Exemple #4
0
 public Tags_Post()
 {
     _db=new Hana.Model.NorthwindDB();
     Init();
 }
Exemple #5
0
 public Tags_Post(string connectionString, string providerName)
 {
     _db=new Hana.Model.NorthwindDB(connectionString, providerName);
     Init();
 }
Exemple #6
0
 public Comment()
 {
     _db=new Hana.Model.NorthwindDB();
     Init();
 }