修改字典表bug

Uat_Study
hang 2023-08-22 10:38:23 +08:00
parent aaed933eb9
commit c4c034f2bb
1 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,6 @@
using IRaCIS.Core.Domain.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
@ -25,5 +26,19 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
.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);
}
}
}