Added interfaces to read and write data in DB and added DbContext implementing these
This commit is contained in:
		| @@ -0,0 +1,24 @@ | ||||
| using Domains.ApplicantDomain; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
| using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||
|  | ||||
| namespace Infrastructure.Database.Configuration.Applicant | ||||
| { | ||||
|     public class NameConfiguration : IEntityTypeConfiguration<Name> | ||||
|     { | ||||
|         public void Configure(EntityTypeBuilder<Name> entity) | ||||
|         { | ||||
|             entity.Property(p => p.FirstName) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(50); | ||||
|  | ||||
|             entity.Property(p => p.Surname) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(50); | ||||
|  | ||||
|             entity.Property(p => p.Patronymic) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(50); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user