Changed domains, configured links between VisaApplication and Applicant,created generic repository and repositories for domains

This commit is contained in:
2024-08-14 18:49:42 +03:00
parent e0f9a0f10f
commit e3d0d05355
35 changed files with 237 additions and 80 deletions

View File

@@ -0,0 +1,22 @@
using Domains.ApplicantDomain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Infrastructure.Database.Applicants.Configuration
{
public class PlaceOfWorkConfiguration : IEntityTypeConfiguration<PlaceOfWork>
{
public void Configure(EntityTypeBuilder<PlaceOfWork> entity)
{
entity.OwnsOne(p => p.Address);
entity.Property(p => p.Name)
.IsUnicode(false)
.HasMaxLength(200);
entity.Property(p => p.PhoneNum)
.IsUnicode(false)
.HasMaxLength(20);
}
}
}