Fixed configurations of owned types

This commit is contained in:
2024-08-15 23:40:50 +03:00
parent 54e31d41fc
commit 72924fb037
18 changed files with 83 additions and 81 deletions

View File

@@ -1,15 +1,15 @@
using Domains.VisaApplicationDomain;
using Microsoft.EntityFrameworkCore;
using Domains;
using Domains.VisaApplicationDomain;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Infrastructure.Database.VisaApplications.Configuration;
public class PastVisaConfiguration : IEntityTypeConfiguration<PastVisa>
public static class PastVisaConfiguration<T> where T : class, IEntity
{
public void Configure(EntityTypeBuilder<PastVisa> entity)
public static void Configure(OwnedNavigationBuilder<T, PastVisa> entity)
{
entity.Property(p => p.Name)
.IsUnicode(false)
.HasMaxLength(70);
}
}
}