mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 优化 AsTable 自动分表,提供超始小时的设置;
This commit is contained in:
@ -113,7 +113,7 @@ namespace base_entity
|
||||
public B B { get; set; }
|
||||
}
|
||||
|
||||
[Table(Name = "as_table_log_{yyyyMM}", AsTable = "createtime=2022-1-1(1 month)")]
|
||||
[Table(Name = "as_table_log_{yyyyMM}", AsTable = "createtime=2022-1-1 11(1 month)")]
|
||||
class AsTableLog
|
||||
{
|
||||
public Guid id { get; set; }
|
||||
@ -572,6 +572,11 @@ namespace base_entity
|
||||
#endregion
|
||||
fsql.UseJsonMap();
|
||||
|
||||
var atimpl = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog))
|
||||
.AsTableImpl;
|
||||
|
||||
atimpl.GetTableNameByColumnValue(DateTime.Parse("2023-7-1"), autoExpand: true);
|
||||
|
||||
var dywhere = new DynamicFilterInfo { Field = "AspNetRoless.Name", Operator = DynamicFilterOperator.Equal, Value = "Admin" };
|
||||
var method = typeof(ISelect<object>).GetMethod("WhereDynamicFilter");
|
||||
var users4 = fsql.Select<AspNetUsers>().IncludeByPropertyName("AspNetUserRoless", then => then.WhereDynamicFilter(dywhere)).ToList();
|
||||
@ -1086,10 +1091,10 @@ namespace base_entity
|
||||
.ToList();
|
||||
|
||||
|
||||
var atimpl = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog))
|
||||
var atimpl2 = fsql.CodeFirst.GetTableByEntity(typeof(AsTableLog))
|
||||
.AsTableImpl;
|
||||
|
||||
atimpl.GetTableNameByColumnValue(DateTime.Parse("2023-7-1"), autoExpand: true);
|
||||
atimpl2.GetTableNameByColumnValue(DateTime.Parse("2023-7-1"), autoExpand: true);
|
||||
|
||||
|
||||
fsql.Select<User1, UserGroup>()
|
||||
|
Reference in New Issue
Block a user