mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 增加 EfCoreFluentApi 扩展包,接近 efcore fluentApi 的使用习惯;#4
- 增加 ColumnAttribute 属性 InsertValueSql,插入数据的时候指定用 sql 值;
This commit is contained in:
@ -191,6 +191,11 @@ namespace FreeSql.Internal
|
||||
col.DbDefaultValue = colattr.ServerTime == DateTimeKind.Local ? common.Now : common.NowUtc;
|
||||
col.DbInsertValue = colattr.ServerTime == DateTimeKind.Local ? common.Now : common.NowUtc;
|
||||
}
|
||||
if (string.IsNullOrEmpty(colattr.InsertValueSql) == false)
|
||||
{
|
||||
col.DbDefaultValue = colattr.InsertValueSql;
|
||||
col.DbInsertValue = colattr.InsertValueSql;
|
||||
}
|
||||
if (colattr.MapType == typeof(string) && colattr.StringLength != 0)
|
||||
{
|
||||
int strlen = colattr.StringLength;
|
||||
|
Reference in New Issue
Block a user