Update CodeFirst (DateOnly TimeOnly)

This commit is contained in:
sunkaixuan 2023-02-10 18:16:59 +08:00
parent 4796aaa8d3
commit 7dc8ded2a8

View File

@ -346,6 +346,14 @@ namespace SqlSugar
{
continue;
}
if (column.DataType == null&& property != null&& property.PropertyType.Name.IsIn("TimeOnly"))
{
column.DataType = "time";
}
if (column.DataType == null && property != null && property.PropertyType.Name.IsIn("DateOnly"))
{
column.DataType = "date";
}
result.Columns.Add(column);
}
}