// if mock repo object passed to constructor, use Mock interface for unit testing
 public PartiesController(IStoreManagerRepository smRepo)
 {
     this.db = smRepo;
 }
 // if no param passed to constructor, use EF Repository & DbContext
 public PartiesController()
 {
     this.db = new EFStoreManagerRepository();
 }
Пример #3
0
 public StoreManagerController(IStoreManagerRepository smRepo)
 {
     this.smRepo = smRepo;
 }
 // if we tell the controller we are testing, use the mock interface
 public StoreManagerController(IStoreManagerRepository db)
 {
     this.db = db;
 }
Пример #5
0
 public StoreManagerController()
 {
     this.smRepo = new EFStoreManagerRepository();
 }