1

2881099
2023-11-22 19:58:29 +08:00
parent 558cbaf2c4
commit 68964c18bd
19 changed files with 58 additions and 57 deletions

@@ -180,12 +180,12 @@ public class UserExt
## Reference
- [《Database Transaction》](Database-Transaction)
- [《Database Transaction》](%e4%ba%8b%e5%8a%a1)
- [《FreeSql 101, Part 1: Insert Data》](Insert-Data)
- [《FreeSql 101, Part 3: Update Data》](Update-Data)
- [《FreeSql 101, Part 4: Query Data》](Query-Data)
- [《Repository Layer》](Repository-Layer)
- [《Tenant》](Tenant)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
## API

@@ -175,4 +175,4 @@ dto.IncludeMany(fsql, d => d.Vods.Take(10).Where(vod => vod.TypeId == d.TypeId))
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)

@@ -147,6 +147,6 @@ fsql.Select<Topic>()
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Tenant》](Tenant)
- [《Tenant》](%e7%a7%9f%e6%88%b7)

17
Home.md

@@ -42,21 +42,22 @@ FreeSql supports basic CURD. In addition, it also supports creating models based
- 🚧 [《CodeFirst Mode, Part 2: FluentApi》](FluentApi)
- 🚧 [《CodeFirst Mode, Part 3: Custom Attributes》](%e8%87%aa%e5%ae%9a%e4%b9%89%e7%89%b9%e6%80%a7)
- 🚧 [《CodeFirst Mode, Part 4: Type Mapping》](%e7%b1%bb%e5%9e%8b%e6%98%a0%e5%b0%84)
- 🚧 [《CodeFirst Mode, Part 5: Migration Structure》](Migration-Structure)
- 🚧 [《CodeFirst Mode, Part 5: Entity Relationship》](Entity-Relationship)
- 🚧 [《CodeFirst Mode, Part 6: Migration Structure》](CodeFirst#%e8%bf%81%e7%a7%bb%e7%bb%93%e6%9e%84)
- 🚧 [《Introduction to DbFirst Mode》](DbFirst)
#### Advanced
- 🚧 [《Database Transaction》](Database-Transaction)
- 🚧 [《Using Read/Write Separation》](Using-Read-Write-Separation)
- 🚧 [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- 🚧 [《Tenant》](Tenant)
- 🚧 [《Database Transaction》](%e4%ba%8b%e5%8a%a1)
- 🚧 [《Using Read/Write Separation》](%e8%af%bb%e5%86%99%e5%88%86%e7%a6%bb)
- 🚧 [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- 🚧 [《Tenant》](%e7%a7%9f%e6%88%b7)
- [《Return Data》](Return-Data)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- 🚧 [《Expression Function》](Expression-Function)
- 🚧 [《ADO》](ActiveX-Data-Objects)
- 🚧 [《AOP》](Aspect-Oriented-Programming)
- 🚧 [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- 🚧 [《ADO》](ADO)
- 🚧 [《AOP》](AOP)
#### WeChat

@@ -23,5 +23,5 @@ Database configuration> Entity Attribute> FluentApi> Aop (custom entity attribut
- [《CodeFirst Mode, Part 2: FluentApi》](FluentApi)
- [《CodeFirst Mode, Part 3: Custom Attributes》](%e8%87%aa%e5%ae%9a%e4%b9%89%e7%89%b9%e6%80%a7)
- [《CodeFirst Mode, Part 4: Type Mapping》](%e7%b1%bb%e5%9e%8b%e6%98%a0%e5%b0%84)
- [《CodeFirst Mode, Part 5: Migration Structure》](Migration-Structure)
- [《CodeFirst Mode, Part 5: Migration Structure》](CodeFirst#%e8%bf%81%e7%a7%bb%e7%bb%93%e6%9e%84)
- [《CodeFirst Mode, Part 6: Entity Relationship》](Entity-Relationship)

@@ -208,14 +208,14 @@ fsql.Insert<Topic>().MySqlIgnoreInto().AppendData(items).ExecuteAffrows();
## Reference
- [《Database Transaction》](Database-Transaction)
- [《Database Transaction》](%e4%ba%8b%e5%8a%a1)
- [《FreeSql 101, Part 2: Delete Data》](Delete-Data)
- [《FreeSql 101, Part 3: Update Data》](Update-Data)
- [《FreeSql 101, Part 4: Query Data》](Query-Data)
- [《Repository Layer》](Repository-Layer)
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
## API

@@ -60,17 +60,17 @@ FreeSql supports basic CURD. In addition, it also supports creating models based
- [《CodeFirst Mode, Part 2: FluentApi》](FluentApi)
- [《CodeFirst Mode, Part 3: Custom Attributes》](%e8%87%aa%e5%ae%9a%e4%b9%89%e7%89%b9%e6%80%a7)
- [《CodeFirst Mode, Part 4: Type Mapping》](%e7%b1%bb%e5%9e%8b%e6%98%a0%e5%b0%84)
- [《CodeFirst Mode, Part 5: Migration Structure》](Migration-Structure)
- [《CodeFirst Mode, Part 5: Migration Structure》](CodeFirst#%e8%bf%81%e7%a7%bb%e7%bb%93%e6%9e%84)
- [《Introduction to DbFirst Mode》](DbFirst)
#### Advanced
- [《Database Transaction》](Database-Transaction)
- [《Using Read/Write Separation》](Using-Read-Write-Separation)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Database Transaction》](%e4%ba%8b%e5%8a%a1)
- [《Using Read/Write Separation》](%e8%af%bb%e5%86%99%e5%88%86%e7%a6%bb)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
- [《Return Data》](Return-Data)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《AOP》](Aspect-Oriented-Programming)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《AOP》](AOP)

@@ -129,4 +129,4 @@ If you want to use data in a loop, use [Greed Loading](Greed-Loading), otherwise
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)

@@ -163,4 +163,4 @@ var t1 = (
- [《Repository Layer》](Repository-Layer)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)

@@ -67,7 +67,7 @@ For `SqlServer 2012+` version, using the latest `fetch next rows` pagination;
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)

@@ -220,7 +220,7 @@ Assert.Equal("中国[100000] -> 北京[110000] -> 东城区[110101]", t4[3].path
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)

@@ -12,11 +12,11 @@ FreeSql has made great efforts in querying data, especially the functions such a
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Using Read/Write Separation》](Using-Read-Write-Separation)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Using Read/Write Separation》](%e8%af%bb%e5%86%99%e5%88%86%e7%a6%bb)
- [《Performance》](Performance)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
## SqlServer WithLock/WithIndex
@@ -135,14 +135,14 @@ fsql.Select<Region>().WhereDynamicFilter(dyfilter).ToList();
| 【Where】 |
| Where | \<this\> | Lambda | Supports multi-table query expressions, multiple use is equivalent to `AND`. |
| WhereIf | \<this\> | bool, Lambda | Support multi-table query expression |
| Where | \<this\> | string, parms | Native Sql syntax conditions, `Where("id = @id", new {id = 1 })` Note that the prefix `@` will be [determined according to the specific database](ActiveX-Data-Objects#parameterization) |
| WhereIf | \<this\> | bool, string, parms | Native Sql syntax conditions, `WhereIf(true, "id = @id", new {id = 1 })` Note that the prefix `@` will be [determined according to the specific database](ActiveX-Data-Objects#parameterization)|
| Where | \<this\> | string, parms | Native Sql syntax conditions, `Where("id = @id", new {id = 1 })` Note that the prefix `@` will be [determined according to the specific database](ADO#parameterization) |
| WhereIf | \<this\> | bool, string, parms | Native Sql syntax conditions, `WhereIf(true, "id = @id", new {id = 1 })` Note that the prefix `@` will be [determined according to the specific database](ADO#parameterization)|
| WhereCascade | \<this\> | Lambda | When querying multiple tables, add conditions to each table. |
| WhereDynamicFilter | \<this\> | DynamicFilterInfo | Dynamic filter conditions (interact with the front end) |
| 【Group】 |
| GroupBy | \<this\> | Lambda | Group by selected column, `GroupBy(a => a.Name)` | `GroupBy(a => new{a.Name,a.Time})` |
| GroupBy | \<this\> | string, parms | Group by native sql syntax `GroupBy("concat(name, @cc)", new { cc = 1 })`. Note that the prefix `@` will be [determined according to the specific database](ActiveX-Data-Objects#parameterization)|
| Having | \<this\> | string, parms | Filter by aggregation conditions of native sql syntax `Having("count(name) = @cc", new { cc = 1 })`. Note that the prefix `@` will be [determined according to the specific database](ActiveX-Data-Objects#parameterization) |
| GroupBy | \<this\> | string, parms | Group by native sql syntax `GroupBy("concat(name, @cc)", new { cc = 1 })`. Note that the prefix `@` will be [determined according to the specific database](ADO#parameterization)|
| Having | \<this\> | string, parms | Filter by aggregation conditions of native sql syntax `Having("count(name) = @cc", new { cc = 1 })`. Note that the prefix `@` will be [determined according to the specific database](ADO#parameterization) |
| Distinct | \<this\> | | `.Distinct().ToList(x => x.GroupName)` is to perform `DISTINCT` for the specified field. |
| 【Order】 |
| OrderBy | \<this\> | Lambda | Sort by column, `OrderBy(a => a.Time)`, can be used multiple times |

@@ -283,7 +283,7 @@ Applicable to:
- [《LinqToSql》](Linq-to-Sql)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)

@@ -85,7 +85,7 @@ fsql.Select<Topic>()
- [《Repository Layer》](Repository-Layer)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)

@@ -211,9 +211,9 @@ Please view the documentation of [Cascade Saving](Cascade-Saving).
- [《FreeSql 101, Part 4: Query Data》](Query-Data)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](Tenant)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《AOP》](Aspect-Oriented-Programming)
- [《AOP》](AOP)
- [《UnitOfWork》](Unit-of-Work)
- [《DbContext》](Batabase-Context)

@@ -242,6 +242,6 @@ fsql.Select<Topic>()
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《FreeSql Optimization: Lazy Loading》](Lazy-Loading)
- [《FreeSql Optimization: Greed Loading》](Greed-Loading)
- [《Expression Function》](Expression-Function)
- [《Expression Function》](%e8%a1%a8%e8%be%be%e5%bc%8f%e5%87%bd%e6%95%b0)
- [《Performance》](Performance)
- [《Tenant》](Tenant)
- [《Tenant》](%e7%a7%9f%e6%88%b7)

@@ -121,10 +121,10 @@ int Delete(Expression<Func<TEntity, bool>> predicate);
## Reference
- [《Tenant》](Tenant)
- [《Using Read/Write Separation》](Using-Read-Write-Separation)
- [《Sharding Tables and Database》](Sharding-Tables-and-Database)
- [《Tenant》](%e7%a7%9f%e6%88%b7)
- [《Using Read/Write Separation》](%e8%af%bb%e5%86%99%e5%88%86%e7%a6%bb)
- [《Sharding Tables and Database》](%e5%88%86%e8%a1%a8%e5%88%86%e5%ba%93)
- [《Repository Layer》](Repository-Layer)
- [《Filters and Global Filters》](Filters-and-Global-Filters)
- [《AOP》](Aspect-Oriented-Programming)
- [《AOP》](AOP)
- [《DbContext》](Batabase-Context)

@@ -327,7 +327,7 @@ fsql.Update<T1>().SetSource(list).ExecuteSqlBulkCopy();
## Reference
- [《Database Transaction》](Database-Transaction)
- [《Database Transaction》](%e4%ba%8b%e5%8a%a1)
- [《FreeSql 101, Part 1: Insert Data》](Insert-Data)
- [《FreeSql 101, Part 2: Delete Data》](Delete-Data)
- [《FreeSql 101, Part 4: Query Data》](Query-Data)

@@ -185,7 +185,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
});
// 切换租户
fsql.Change(tenant);
fsql.Change(%e7%a7%9f%e6%88%b7);
await next();
}
finally