.net ef core list<string> 属性映射
entity.Property(e => e.RelatedSo)
.HasConversion(v => JsonSerializer.Serialize(v, default),
v => JsonSerializer.Deserialize>(v, default))
.Metadata
.SetValueComparer(new ValueComparer>(
(c1, c2) => c1.SequenceEqual(c2),
c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
版权声明:
作者:lichengxin
链接:https://www.techfm.club/p/7324.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论