修改字典表bug
parent
aaed933eb9
commit
c4c034f2bb
|
@ -1,5 +1,6 @@
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,5 +26,19 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
||||||
.HasPrincipalKey(c => new { c.TrialId, c.SiteId });
|
.HasPrincipalKey(c => new { c.TrialId, c.SiteId });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DictionaryConfigration : IEntityTypeConfiguration<Dictionary>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public void Configure(EntityTypeBuilder<Dictionary> builder)
|
||||||
|
{
|
||||||
|
builder.Property(e => e.MappedValue).Metadata.SetBeforeSaveBehavior(PropertySaveBehavior.Ignore);
|
||||||
|
builder.Property(e => e.MappedValue).Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue