internal static IRepository <Post> GetRepo(string connectionString, string providerName) { SubSonic.tempdbDB db; if (String.IsNullOrEmpty(connectionString)) { db = new SubSonic.tempdbDB(); } else { db = new SubSonic.tempdbDB(connectionString, providerName); } IRepository <Post> _repo; if (db.TestMode) { Post.SetTestRepo(); _repo = _testRepo; } else { _repo = new SubSonicRepository <Post>(db); } return(_repo); }
public Post(string connectionString, string providerName) { _db=new SubSonic.tempdbDB(connectionString, providerName); Init(); }
internal static IRepository<Post> GetRepo(string connectionString, string providerName){ SubSonic.tempdbDB db; if(String.IsNullOrEmpty(connectionString)){ db=new SubSonic.tempdbDB(); }else{ db=new SubSonic.tempdbDB(connectionString, providerName); } IRepository<Post> _repo; if(db.TestMode){ Post.SetTestRepo(); _repo=_testRepo; }else{ _repo = new SubSonicRepository<Post>(db); } return _repo; }
public Post(){ _db=new SubSonic.tempdbDB(); Init(); }
public Post() { _db = new SubSonic.tempdbDB(); Init(); }
public Post(string connectionString, string providerName) { _db = new SubSonic.tempdbDB(connectionString, providerName); Init(); }