コード例 #1
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;
            }
        }
コード例 #2
0
 public SqliteRepositoryString(IORMHelper helper) : base(helper, ":", "DATETIME('NOW','LOCALTIME')")
 {
     this.helper = helper;
 }
コード例 #3
0
 public MysqlRepositoryString(IORMHelper helper) : base(helper, "@", "NOW()")
 {
     this.helper = helper;
 }
コード例 #4
0
 public OracleRepositoryString(IORMHelper helper) : base(helper, ":", "SYSDATE")
 {
 }
コード例 #5
0
 public BaseRepositoryString(IORMHelper helper, string ParamMark, string DBNowDatefunction)
 {
     this.helper            = helper;
     this.ParamMark         = ParamMark;
     this.DBNowDatefunction = DBNowDatefunction;
 }
コード例 #6
0
 public BaseRepositoryString(IORMHelper helper)
 {
     this.helper = helper;
 }