update

28810
2019-09-27 12:30:24 +08:00
parent 7a83f6975f
commit 17b6cf08e2
7 changed files with 8 additions and 8 deletions

@@ -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语句 |

@@ -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 的列表 |
| 【分页】 |

@@ -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语句 |

@@ -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 |

@@ -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 | 忽略的列 |

@@ -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 | 缓存查询结果 |

@@ -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 |