Updated 查询 (markdown)

AlexLEWIS
2021-08-20 11:24:27 +08:00
parent 5dc90adfa6
commit 8558a3df85

@@ -47,6 +47,7 @@ DynamicFilterInfo dyfilter = JsonConvert.DeserializeObject<DynamicFilterInfo>(@"
]
}");
fsql.Select<VM_District_Parent>().WhereDynamicFilter(dyfilter).ToList();
//SELECT a.""Code"", a.""Name"", a.""ParentCode"", a__Parent.""Code"" as4, a__Parent.""Name"" as5, a__Parent.""ParentCode"" as6
//FROM ""D_District"" a
//LEFT JOIN ""D_District"" a__Parent ON a__Parent.""Code"" = a.""ParentCode""
@@ -94,7 +95,7 @@ fsql.Select<VM_District_Parent>().WhereDynamicFilter(dyfilter).ToList();
| OrderBy | \<this\> | Lambda | 按列排序OrderBy(a => a.Time),可多次使用 |
| OrderByDescending | \<this\> | Lambda | 按列倒向排序OrderByDescending(a => a.Time) |
| OrderBy | \<this\> | string, parms | 按原生sql语法排序OrderBy("count(name) + @cc", new { cc = 1 }) |
| OrderByPropertyName | string, bool | 按属性名字符串排序(支持导航属性) |
| OrderByPropertyName | string, bool | | 按属性名字符串排序(支持导航属性) |
| 【联表】 |
| LeftJoin | \<this\> | Lambda | 左联查询,可使用导航属性,或指定关联的实体类型 |
| InnerJoin | \<this\> | Lambda | 联接查询,可使用导航属性,或指定关联的实体类型 |
@@ -113,7 +114,7 @@ fsql.Select<VM_District_Parent>().WhereDynamicFilter(dyfilter).ToList();
| ForUpdate | \<this\> | bool | 排他更新锁,对不同的数据库已作适配,详细说明见注释 |
| AsQueryable | IQueryable | | 将 ISelect 转换为 IQueryable此方法主要用于扩展比如abp IRepository GetAll() 接口方法需要返回 IQueryable 对象。注意IQueryable 方法污染较为严重,请尽量避免此转换 |
| InsertInto | int | string, Lambda | 将查询转换为 INSERT INTO tableName SELECT ... FROM t 执行插入 |
| ToUpdate | IUpdate\<TENtity\> | 无 | 将查询转为更新对象 |
| ToDelete | IDelete\<TENtity\> | 无 | 将查询转为删除对象 |
| ToUpdate | IUpdate\<TEntity\> | 无 | 将查询转为更新对象 |
| ToDelete | IDelete\<TEntity\> | 无 | 将查询转为删除对象 |
| ToTreeList | List\<TEntity\> | 无 | 将父子关系的数据以 TreeList 的形式返回 |
| AsTreeCte | ISelect | (up, pathSelector, level) | 递归查询父子关系表 |