mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-09 01:40:56 +08:00
update
4
修改.md
4
修改.md
@@ -157,14 +157,14 @@ var t10 = update.SetRaw("Title = @title", new { title = "新标题" }).Where("Id
|
||||
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| - | - | - | - |
|
||||
| SetSource | \<this\> | T1 \| IEnumerable<T1> | 更新数据,设置更新的实体 |
|
||||
| SetSource | \<this\> | T1 \| IEnumerable\<T1\> | 更新数据,设置更新的实体 |
|
||||
| IgnoreColumns | \<this\> | Lambda | 忽略的列 |
|
||||
| Set | \<this\> | Lambda, value | 设置列的新值,Set(a => a.Name, "newvalue") |
|
||||
| Set | \<this\> | Lambda | 设置列的的新值为基础上增加,Set(a => a.Clicks + 1),相当于 clicks=clicks+1; |
|
||||
| SetRaw | \<this\> | string, parms | 设置值,自定义SQL语法,SetRaw("title = ?title", new { title = "newtitle" }) |
|
||||
| Where | \<this\> | Lambda | 表达式条件,仅支持实体基础成员(不包含导航对象) |
|
||||
| Where | \<this\> | string, parms | 原生sql语法条件,Where("id = ?id", new { id = 1 }) |
|
||||
| Where | \<this\> | T1 \| IEnumerable<T1> | 传入实体或集合,将其主键作为条件 |
|
||||
| Where | \<this\> | T1 \| IEnumerable\<T1\> | 传入实体或集合,将其主键作为条件 |
|
||||
| WhereExists | \<this\> | ISelect | 子查询是否存在 |
|
||||
| WithTransaction | \<this\> | DbTransaction | 设置事务对象 |
|
||||
| ToSql | string | | 返回即将执行的SQL语句 |
|
||||
|
||||
2
分页查询.md
2
分页查询.md
@@ -36,7 +36,7 @@ SqlServer 2012+ 版本,使用最新的 fetch next rows 分页;
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| ------------- | - | - | - |
|
||||
| ToSql | string | | 返回即将执行的SQL语句 |
|
||||
| ToList | List<T1> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList | List\<T1\> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<T\> | List\<T\> | Lambda | 执行SQL查询,返回指定字段的记录,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<T\> | List\<T\> | string field | 执行SQL查询,返回 field 指定字段的记录,并以元组或基础类型(int,string,long)接收,记录不存在时返回 Count 为 0 的列表 |
|
||||
| 【分页】 |
|
||||
|
||||
2
删除.md
2
删除.md
@@ -88,7 +88,7 @@ var t8 = fsql.Delete<Topic>().Where(items).ToSql();
|
||||
| - | - | - | - |
|
||||
| Where | \<this\> | Lambda | 表达式条件,仅支持实体基础成员(不包含导航对象) |
|
||||
| Where | \<this\> | string, parms | 原生sql语法条件,Where("id = ?id", new { id = 1 }) |
|
||||
| Where | \<this\> | T1 \| IEnumerable<T1> | 传入实体或集合,将其主键作为条件 |
|
||||
| Where | \<this\> | T1 \| IEnumerable\<T1\> | 传入实体或集合,将其主键作为条件 |
|
||||
| WhereExists | \<this\> | ISelect | 子查询是否存在 |
|
||||
| WithTransaction | \<this\> | DbTransaction | 设置事务对象 |
|
||||
| ToSql | string | | 返回即将执行的SQL语句 |
|
||||
|
||||
2
查询.md
2
查询.md
@@ -22,7 +22,7 @@ FreeSql在查询数据下足了功能,链式查询语法、多表查询、表
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| ------------- | - | - | - |
|
||||
| ToSql | string | | 返回即将执行的SQL语句 |
|
||||
| ToList | List<T1> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList | List\<T1\> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<T\> | List\<T\> | Lambda | 执行SQL查询,返回指定字段的记录,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<T\> | List\<T\> | string field | 执行SQL查询,返回 field 指定字段的记录,并以元组或基础类型(int,string,long)接收,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToOne | T1 | | 执行SQL查询,返回 T1 实体所有字段的第一条记录,记录不存在时返回 null |
|
||||
|
||||
2
添加.md
2
添加.md
@@ -105,7 +105,7 @@ var t6 = insert.AppendData(items).IgnoreColumns(a => new { a.Title, a.CreateTime
|
||||
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| - | - | - | - |
|
||||
| AppendData | \<this\> | T1 \| IEnumerable<T1> | 追加准备插入的实体 |
|
||||
| AppendData | \<this\> | T1 \| IEnumerable\<T1\> | 追加准备插入的实体 |
|
||||
| InsertIdentity | \<this\> | 无 | 指明插入自增列 |
|
||||
| InsertColumns | \<this\> | Lambda | 只插入的列 |
|
||||
| IgnoreColumns | \<this\> | Lambda | 忽略的列 |
|
||||
|
||||
2
缓存.md
2
缓存.md
@@ -45,6 +45,6 @@ Assert.Equal(result1.Count, result1.Count);
|
||||
## API
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| ------------- | - | - | - |
|
||||
| ToList | List<T1> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList | List\<T1\> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| 【其他】 |
|
||||
| Caching | \<this\> | int seconds, string key = null | 缓存查询结果 |
|
||||
2
返回数据.md
2
返回数据.md
@@ -129,7 +129,7 @@ fsql.Select<Song>().OrderBy(a => a.Id).ToChunk(100, list =>
|
||||
| 方法 | 返回值 | 参数 | 描述 |
|
||||
| ------------- | - | - | - |
|
||||
| ToSql | string | | 返回即将执行的SQL语句 |
|
||||
| ToList | List<T1> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList | List\<T1\> | | 执行SQL查询,返回 T1 实体所有字段的记录,若存在导航属性则一起查询返回,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<Dto\> | List\<Dto\> | Lambda | 执行SQL查询,返回指定字段或Dto映射的记录,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToList\<T\> | List\<T\> | string field | 执行SQL查询,返回 field 指定字段的记录,并以元组或基础类型(int,string,long)接收,记录不存在时返回 Count 为 0 的列表 |
|
||||
| ToOne | T1 | | 执行SQL查询,返回 T1 实体所有字段的第一条记录,记录不存在时返回 null |
|
||||
|
||||
Reference in New Issue
Block a user