24 lines
		
	
	
		
			730 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			730 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Domains;
 | |
| using Domains.ApplicantDomain;
 | |
| using Microsoft.EntityFrameworkCore.Metadata.Builders;
 | |
| 
 | |
| namespace Infrastructure.Database.Applicants.Configuration;
 | |
| 
 | |
| public static class NameConfiguration<T> where T : class, IEntity
 | |
| {
 | |
|     public static void Configure(OwnedNavigationBuilder<T, Name> entity)
 | |
|     {
 | |
|         entity.Property(p => p.FirstName)
 | |
|             .IsUnicode(false)
 | |
|             .HasMaxLength(ConfigurationConstraints.NameLength);
 | |
| 
 | |
|         entity.Property(p => p.Surname)
 | |
|             .IsUnicode(false)
 | |
|             .HasMaxLength(ConfigurationConstraints.NameLength);
 | |
| 
 | |
|         entity.Property(p => p.Patronymic)
 | |
|             .IsUnicode(false)
 | |
|             .HasMaxLength(ConfigurationConstraints.NameLength);
 | |
|     }
 | |
| }
 |