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