mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-03-27 16:30:56 +08:00
update
6
分表分库.md
6
分表分库.md
@@ -76,9 +76,13 @@ class AsTableLog
|
||||
> 若最大日期大于当前时间,可手工扩容分表:
|
||||
|
||||
```csharp
|
||||
fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog))
|
||||
var tableName = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog))
|
||||
.AsTableImpl
|
||||
.GetTableNameByColumnValue(DateTime.Parse("2023-7-1"), autoExpand: true);
|
||||
|
||||
//创建数据库表
|
||||
if (fsql.DbFirst.ExistsTable(tableName) == false)
|
||||
fsql.CodeFirst.SyncStructure(typeof(AsTableLog), tableName);
|
||||
```
|
||||
|
||||
| 示范 | 说明 |
|
||||
|
||||
Reference in New Issue
Block a user