public CustomBaseTokenStore(DapperRepo repo, TokenType tokenType, IScopeStore scopeStore, IClientStore clientStore)
 {
     _tokenType   = tokenType;
     _scopeStore  = scopeStore;
     _clientStore = clientStore;
     _repo        = repo;
 }
Exemple #2
0
            public void CanLoadAllToDos()
            {
                DapperRepo myRepo = new DapperRepo();

                List <ToDoTableRow> AllToDos = new List <ToDoTableRow>();

                //AllToDos = _repo.GetAll().ToList();
                AllToDos = myRepo.GetAll().ToList();

                Assert.AreEqual(3, AllToDos.Count());
            }
        public IEnumerable <TestObj1> GetDynamicSqlRecord()
        {
            var sqlCmd = "select 'TestField1' as 'Field1', 'TestField2' as 'Field2', 'TestField3' as 'Field3', 'TestField4' as 'Field4' ";

            var response = DapperRepo.ExecuteDynamicSql <TestObj1>(
                sql: sqlCmd,
                dbconnectionString: DefaultConnectionString, //_connectionSettings.Conn1,
                sqltimeout: DefaultTimeOut,
                dbconnection: _connection,
                dbtransaction: _transaction);

            return(response);
        }
        public IEnumerable <TestObj2> GetStoredProcRecord(int supportRepId, string country)
        {
            var sqlStoredProc = "sp_get_Customer"; // find this stored proc inside this project: Infrastructure => Assets => Database => 02. STORED PROCEDURES [TestDB].sql

            var response = DapperRepo.GetFromStoredProc <TestObj2>
                               (storedProcedureName: sqlStoredProc,
                               parameters: new
            {
                SupportRepId = supportRepId,
                Country      = country
            },

                               dbconnectionString: DefaultConnectionString,
                               sqltimeout: DefaultTimeOut,
                               dbconnection: _connection,
                               dbtransaction: _transaction);

            return(response);
        }
Exemple #5
0
        public static IDvdsRepo GetMode()
        {
            string mode = ConfigurationManager.AppSettings["Mode"].ToString();

            if (mode == "ADO")
            {
                ADORepo repo = new ADORepo();
                return(repo);
            }
            else if (mode == "DAP")
            {
                DapperRepo repo = new DapperRepo();
                return(repo);
            }
            else
            {
                MockRepo repo = new MockRepo();
                return(repo);
            }
        }
 public CustomScopeStore(DapperRepo repo)
 {
     _repo = repo;
 }
Exemple #7
0
 public CustomClientStore(DapperRepo repo)
 {
     _repo = repo;
 }
 public MyMembershipService(DapperRepo repo)
 {
     _repo = repo;
 }
Exemple #9
0
 public CustomIdentityUserService(MyMembershipService membershipService, DapperRepo repo)
 {
     _membershipService = membershipService;
     _repo = repo;
 }
 public CustomRefreshTokenStore(DapperRepo repo, IScopeStore scopeStore, IClientStore clientStore)
     : base(repo, TokenType.RefreshToken, scopeStore, clientStore)
 {
 }
 public CustomAuthorizationCodeStore(DapperRepo repo, IScopeStore scopeStore, IClientStore clientStore)
     : base(repo, TokenType.AuthorizationCode, scopeStore, clientStore)
 {
 }
 public CustomTokenHandleStore(DapperRepo repo, IScopeStore scopeStore, IClientStore clientStore)
     : base(repo, TokenType.TokenHandle, scopeStore, clientStore)
 {
 }