static public IDbCustomer GetDbContext(string projectName) { IDbCustomer obCustomer = null; switch (projectName) { case "XXX": obCustomer = new context1(); break; case "YYY": obCustomer = new context2(); break; default: break; } return(obCustomer); }
/// <summary> /// This method will instantiate a new customercontroller. /// </summary> public CustomerController() { _dbCustomer = new DbCustomer(); }
/// <summary> /// The Constructor of Customer controller /// </summary> /// <param name="dbCustomer"></param> public CustomerCtr(IDbCustomer dbCustomer) { DbCustomer = dbCustomer; }