mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 IAsTable.SetTableName 自定义分表名;
This commit is contained in:
@ -42,4 +42,9 @@ class ModAsTableImpl : IAsTable
|
||||
if (tables.Any() == false) return AllTables;
|
||||
return tables;
|
||||
}
|
||||
|
||||
public IAsTable SetTableName(int index, string tableName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
@ -601,8 +601,12 @@ namespace base_entity
|
||||
#endregion
|
||||
|
||||
fsql.Select<AsTableLog>().Where(a => a.createtime > DateTime.Now && a.createtime < DateTime.Now.AddMonths(1)).ToList();
|
||||
//var table = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog));
|
||||
//table.SetAsTable(new ModAsTableImpl(fsql), table.ColumnsByCs[nameof(AsTableLog.click)]);
|
||||
//var table = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog));
|
||||
//table.SetAsTable(new ModAsTableImpl(fsql), table.ColumnsByCs[nameof(AsTableLog.click)]);
|
||||
|
||||
fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog)).AsTableImpl
|
||||
.SetTableName(0, "AsTableLog1")
|
||||
.SetTableName(1, "AsTableLog2");
|
||||
|
||||
var testitems = new[]
|
||||
{
|
||||
|
Reference in New Issue
Block a user