/// <summary>
 /// 使用指定 <see cref="QualityMgmtSystem.Orm.DbProvider"/> 初始化传动器
 /// </summary>
 /// <param name="dbProvider"></param>
 public Driver(DbProvider dbProvider)
 {
     this.DbProvider = dbProvider;
 }
Ejemplo n.º 2
0
 public Table(DbProvider dbProvider)
 {
     this.DbProvider = dbProvider;
 }
Ejemplo n.º 3
0
 public TransactionExecutor(DbProvider provider)
 {
     this._provider = provider;
 }
        public static IDriver <T> Select <T>(this DbProvider provider) where T : class
        {
            Table <T> table = new Table <T>(provider);

            return(table.Select());
        }
        public static IDriver <T> Query <T>(this DbProvider provider, String sql) where T : class
        {
            Table <T> table = new Table <T>(provider);

            return(table.SelectSQL <T>(sql));
        }
        public static IDriver <T> BatchInsert <T>(this DbProvider provider, IEnumerable <T> obj) where T : class
        {
            Table <T> table = new Table <T>(provider);

            return(table.BatchInsert(obj));
        }
        public static IDriver <T> Insert <T>(this DbProvider provider, T obj) where T : class
        {
            Table <T> table = new Table <T>(provider);

            return(table.Insert(obj));
        }
        public static IDriver <T> Update <T>(this DbProvider provider, Expression <Func <T> > regenerator) where T : class
        {
            Table <T> table = new Table <T>(provider);

            return(table.Update(regenerator));
        }
        public static Table <T> CreateTable <T>(this DbProvider dbProvider) where T : class
        {
            Table <T> table = new Table <T>(dbProvider);

            return(table);
        }
        public static DataTable Query(this DbProvider provider, String sql, DbParameter[] paras = null, DbConnection connection = null)
        {
            Table table = new Table(provider);

            return(table.Query(sql, paras, connection));
        }