public ReportsRepository() { Connection conn = new Connection(); connectString = conn.GetDirectConnString(); sqlcmd = SqlFactory.MSSQL(); }
public ProposalRepository() { sqlcmd = SqlFactory.MSSQL(); prop = new Proposal(); propinfo = new ProposalInfo(); // ...MoreComing. }
public DapperCrud(string connectionString, ISqlCommands <T> sqlCommands = null) { if (sqlCommands != null) { _sqlCommands = sqlCommands; } _conn = new SqlConnection(connectionString); }
public BudgetRepository() { //string connString = Settings.Default.EntityConnection; // Context = new BOTADBEntities1(); Connection conn = new Connection(); connectString = conn.GetDirectConnString(); sqlcmd = SqlFactory.MSSQL(); }
public AccountRepository() { // conn = new Connection(); // _configuration = ObjectFactory.GetInstance<IConfiguration>(); account = new Account(); sqlcmd = SqlFactory.MSSQL(); //Later we can add more like SqlFactory.Oracle(); Which will still have the same sqlcmd.GetUserByName(Username) methods. //How? StrucuteMapBootStrapper will switch the ISqlCommands to another Implementer! }
public SampleController(ISqlCommands commands, IDistributedCache distributedCache) { _commands = commands; _distributedCache = distributedCache; }