修复默认SegmentName报错问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
05b2ab75a3
commit
736266d8e8
|
|
@ -239,7 +239,6 @@ public enum ReadingOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[ComplexType]
|
|
||||||
public class DefaultSegmentNameDto
|
public class DefaultSegmentNameDto
|
||||||
{
|
{
|
||||||
public string SegmentationName { get; set; } =string.Empty;
|
public string SegmentationName { get; set; } =string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -104,10 +104,10 @@ public class IRaCISDBContext : DbContext
|
||||||
modelBuilder.Entity<ReadingQuestionCriterionTrial>(entity =>
|
modelBuilder.Entity<ReadingQuestionCriterionTrial>(entity =>
|
||||||
{
|
{
|
||||||
//默认SegmentName
|
//默认SegmentName
|
||||||
entity.OwnsOne(x => x.DefaultSegmentName, ownedNavigationBuilder =>
|
entity.Property(e => e.DefaultSegmentName).HasConversion(
|
||||||
{
|
v => v == null ? null : JsonConvert.SerializeObject(v),
|
||||||
ownedNavigationBuilder.ToJson();
|
v => string.IsNullOrEmpty(v) ? new DefaultSegmentNameDto() : JsonConvert.DeserializeObject<DefaultSegmentNameDto>(v)
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
#region pgsql codefirst 配置 暂时屏蔽
|
#region pgsql codefirst 配置 暂时屏蔽
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue