mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 优化 AsTable 自动分表,提供超始小时的设置;
This commit is contained in:
parent
e489ec3c64
commit
533a472adb
@ -113,7 +113,7 @@ namespace base_entity
|
||||
public B B { get; set; }
|
||||
}
|
||||
|
||||
[Table(Name = "as_table_log_{yyyyMM}", AsTable = "createtime=2022-1-1 11(1 month)")]
|
||||
[Table(Name = "as_table_log_{yyyyMMddHH}", AsTable = "createtime=2022-1-1 11(1 month)")]
|
||||
class AsTableLog
|
||||
{
|
||||
public Guid id { get; set; }
|
||||
@ -521,7 +521,7 @@ namespace base_entity
|
||||
.UseAutoSyncStructure(true)
|
||||
.UseNoneCommandParameter(true)
|
||||
.UseNameConvert(NameConvertType.ToLower)
|
||||
.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
||||
//.UseMappingPriority(MappingPriorityType.Attribute, MappingPriorityType.FluentApi, MappingPriorityType.Aop)
|
||||
|
||||
|
||||
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=:memory:")
|
||||
|
@ -104,7 +104,7 @@ namespace FreeSql.DataAnnotations
|
||||
public DateTimeAsTableImpl(string tableName, DateTime beginTime, Func<DateTime, DateTime> nextTimeFunc)
|
||||
{
|
||||
if (nextTimeFunc == null) throw new ArgumentException(CoreStrings.Cannot_Be_NULL_Name("nextTimeFunc"));
|
||||
beginTime = beginTime.Date; //日期部分作为开始
|
||||
//beginTime = beginTime.Date; //日期部分作为开始
|
||||
_beginTime = beginTime;
|
||||
_nextTimeFunc = nextTimeFunc;
|
||||
_tableName = tableName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user