修复bug
This commit is contained in:
Binary file not shown.
@@ -389,13 +389,22 @@ namespace WMS.Web.Repositories.Configuration
|
|||||||
ent.ToTable("t_wms_subscribe_notification");
|
ent.ToTable("t_wms_subscribe_notification");
|
||||||
ent.HasKey(x => x.Id);
|
ent.HasKey(x => x.Id);
|
||||||
|
|
||||||
|
var valueComparer = new ValueComparer<List<string>>(
|
||||||
|
(c1, c2) => c1.SequenceEqual(c2),
|
||||||
|
c => c.Aggregate(0, (a, v) => HashCode.Combine(a, v.GetHashCode())),
|
||||||
|
c => c.ToList());
|
||||||
|
|
||||||
ent.Property(f => f.Telephones).HasConversion(
|
ent.Property(f => f.Telephones).HasConversion(
|
||||||
v => JsonConvert.SerializeObject(v),
|
v => JsonConvert.SerializeObject(v),
|
||||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
v => JsonConvert.DeserializeObject<List<string>>(v))
|
||||||
|
.Metadata
|
||||||
|
.SetValueComparer(valueComparer);
|
||||||
|
|
||||||
ent.Property(f => f.Emails).HasConversion(
|
ent.Property(f => f.Emails).HasConversion(
|
||||||
v => JsonConvert.SerializeObject(v),
|
v => JsonConvert.SerializeObject(v),
|
||||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
v => JsonConvert.DeserializeObject<List<string>>(v))
|
||||||
|
.Metadata
|
||||||
|
.SetValueComparer(valueComparer); ;
|
||||||
});
|
});
|
||||||
|
|
||||||
base.OnModelCreating(builder);
|
base.OnModelCreating(builder);
|
||||||
|
|||||||
Reference in New Issue
Block a user