Fixed configurations of owned types
This commit is contained in:
		| @@ -9,11 +9,13 @@ public class ApplicantConfiguration : IEntityTypeConfiguration<Applicant> | ||||
|     public void Configure(EntityTypeBuilder<Applicant> entity) | ||||
|     { | ||||
|         entity.ToTable("Applicants"); | ||||
|         entity.OwnsOne(p => p.Name, NameConfiguration<Applicant>.Configure); | ||||
|         entity.OwnsOne(p => p.FatherName, NameConfiguration<Applicant>.Configure); | ||||
|         entity.OwnsOne(p => p.MotherName, NameConfiguration<Applicant>.Configure); | ||||
|         entity.OwnsOne(p => p.Passport, PassportConfiguration<Applicant>.Configure); | ||||
|  | ||||
|         entity.OwnsOne(p => p.Name); | ||||
|         entity.OwnsOne(p => p.FatherName); | ||||
|         entity.OwnsOne(p => p.MotherName); | ||||
|         entity.OwnsOne(p => p.Passport); | ||||
|         entity.HasOne(a => a.CityOfBirth).WithMany().OnDelete(DeleteBehavior.Restrict); | ||||
|         entity.HasOne(a => a.CountryOfBirth).WithMany().OnDelete(DeleteBehavior.Restrict); | ||||
|  | ||||
|         entity.Property(p => p.Citizenship) | ||||
|             .IsUnicode(false) | ||||
| @@ -23,4 +25,4 @@ public class ApplicantConfiguration : IEntityTypeConfiguration<Applicant> | ||||
|             .IsUnicode(false) | ||||
|             .HasMaxLength(30); | ||||
|     } | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user