Removed location entities, fixed configurations and controllers' comments
This commit is contained in:
		| @@ -1,6 +1,5 @@ | ||||
| using Domains; | ||||
| using Domains.ApplicantDomain; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
| using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||
|  | ||||
| namespace Infrastructure.Database.Applicants.Configuration; | ||||
| @@ -9,15 +8,20 @@ public static class AddressConfiguration<T> where T : class, IEntity | ||||
| { | ||||
|     public static void Configure(OwnedNavigationBuilder<T, Address> entity) | ||||
|     { | ||||
|         entity.HasOne(a => a.Country).WithMany().OnDelete(DeleteBehavior.Restrict); | ||||
|         entity.HasOne(a => a.City).WithMany().OnDelete(DeleteBehavior.Restrict); | ||||
|  | ||||
|         entity.Property(p => p.Street) | ||||
|         entity.Property(a => a.Country) | ||||
|             .IsUnicode(false) | ||||
|             .HasMaxLength(100); | ||||
|             .HasMaxLength(ConfigurationConstraints.CountryNameLength); | ||||
|  | ||||
|         entity.Property(p => p.Building) | ||||
|         entity.Property(a => a.City) | ||||
|             .IsUnicode(false) | ||||
|             .HasMaxLength(10); | ||||
|             .HasMaxLength(ConfigurationConstraints.CityNameLength); | ||||
|  | ||||
|         entity.Property(a => a.Street) | ||||
|             .IsUnicode(false) | ||||
|             .HasMaxLength(ConfigurationConstraints.StreetNameLength); | ||||
|  | ||||
|         entity.Property(a => a.Building) | ||||
|             .IsUnicode(false) | ||||
|             .HasMaxLength(ConfigurationConstraints.BuildingNumberLength); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user