Пример #1
0
        public BaseRepository(IRepositoryString repoString, IDbConnection connection)
        {
            this.repoString = repoString;
            this.logger     = Log.Logger;

            this.connection = connection;
        }
Пример #2
0
        public BaseRepository(IDbConnection connection)
        {
            this.repoString = new BaseRepositoryString(new BaseORMHelper());
            this.logger     = Log.Logger;

            this.connection = connection;
        }
Пример #3
0
        public RepoTest()
        {
            string dbStr = "sqlite";

            switch (dbStr)
            {
            case "sqlite":
                this.helper     = new BaseORMHelper();
                this.repoString = new SqliteRepositoryString(helper);
                this.repo       = new BaseRepository(repoString);
                this.repo.SetConnection(new ConnectionFactory().Connection("sqlite"));
                break;

            case "mysql":
                this.helper     = new BaseORMHelper();
                this.repoString = new MysqlRepositoryString(helper);
                this.repo       = new BaseRepository(repoString);
                this.repo.SetConnection(new ConnectionFactory().Connection("mysql"));
                break;
            }
        }
Пример #4
0
 public BaseRepository(IRepositoryString repoString)
 {
     this.repoString = repoString;
     this.logger     = Log.Logger;
 }