修改导表日期处理
This commit is contained in:
@@ -67,13 +67,13 @@ public class IRaCISDBContext : DbContext
|
||||
// 使用部分加密值转换器,前 2 个字符不加密,方便模糊搜索
|
||||
entity.Property(e => e.Name).HasConversion(new PartialEncryptionConverter(2));
|
||||
|
||||
entity.OwnsMany(x => x.TestJsonObjectLsit, ownedNavigationBuilder =>
|
||||
{
|
||||
ownedNavigationBuilder.ToJson();
|
||||
});
|
||||
//entity.OwnsMany(x => x.TestJsonObjectLsit, ownedNavigationBuilder =>
|
||||
//{
|
||||
// ownedNavigationBuilder.ToJson();
|
||||
//});
|
||||
|
||||
//entity.Property(e => e.TestJsonObjectLsit).HasConversion(v => v == null ? "[]" : JsonConvert.SerializeObject(v),
|
||||
// v => string.IsNullOrEmpty(v) ? null : JsonConvert.DeserializeObject<List<TestJsonObject>>(v));
|
||||
entity.Property(e => e.TestJsonObjectLsit).HasConversion(v => v == null ? "[]" : JsonConvert.SerializeObject(v),
|
||||
v => string.IsNullOrEmpty(v) ? null : JsonConvert.DeserializeObject<List<TestJsonObject>>(v));
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Trial>(entity =>
|
||||
@@ -81,7 +81,7 @@ public class IRaCISDBContext : DbContext
|
||||
//项目术语配置
|
||||
entity.OwnsMany(x => x.TrialObjectNameList, ownedNavigationBuilder =>
|
||||
{
|
||||
ownedNavigationBuilder.ToJson();
|
||||
ownedNavigationBuilder.ToJson() ;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -595,8 +595,9 @@ public class TestLength : Entity
|
||||
[StringLength(1000)]
|
||||
public List<TestEnum> TestEnumList { get; set; } = new List<TestEnum>();
|
||||
|
||||
[MaxLength]
|
||||
public List<TestJsonObject> TestJsonObjectLsit { get; set; }
|
||||
|
||||
public DateOnly? TestDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user