Example #1
0
        /// <summary>
        /// 返回一个From节
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public FromSection <T> From <T>(TableRelation <T> relation)
            where T : Entity
        {
            FromSection <T> section = From <T>();

            section.SetQuerySection(relation.Section.Query);

            //给查询设置驱动与事务
            section.Query.SetDbProvider(dbProvider, this);

            return(section);
        }
Example #2
0
 /// <summary>
 /// 生成一个子查询
 /// </summary>
 /// <returns></returns>
 public TableRelation <T> SubQuery()
 {
     section.SetQuerySection(section.SubQuery());
     return(this);
 }