mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 增加 TableInfo.SetAsTable 自动分表的设置;
This commit is contained in:
parent
0de393169d
commit
5659e527ed
@ -584,6 +584,11 @@ namespace base_entity
|
||||
.OrderBy((a,b) => a.createtime)
|
||||
.ToSql();
|
||||
|
||||
|
||||
var table = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog));
|
||||
//table.SetAsTable(null, table.ColumnsByCs[nameof(AsTableLog.createtime)]);
|
||||
|
||||
|
||||
var testitems = new[]
|
||||
{
|
||||
new AsTableLog{ msg = "msg01", createtime = DateTime.Parse("2022-1-1 13:00:11"), click = 1 },
|
||||
|
@ -32,6 +32,12 @@ namespace FreeSql.Internal.Model
|
||||
public ColumnInfo AsTableColumn { get; internal set; }
|
||||
public ColumnInfo VersionColumn { get; set; }
|
||||
|
||||
public void SetAsTable(IAsTable astable, ColumnInfo column)
|
||||
{
|
||||
AsTableImpl = astable;
|
||||
AsTableColumn = column;
|
||||
}
|
||||
|
||||
ConcurrentDictionary<string, TableRef> _refs { get; } = new ConcurrentDictionary<string, TableRef>(StringComparer.CurrentCultureIgnoreCase);
|
||||
|
||||
internal void AddOrUpdateTableRef(string propertyName, TableRef tbref)
|
||||
|
Loading…
x
Reference in New Issue
Block a user