Changed domains, configured links between VisaApplication and Applicant,created generic repository and repositories for domains
This commit is contained in:
		| @@ -0,0 +1,18 @@ | ||||
| using Domains.ApplicantDomain; | ||||
| using Infrastructure.Database.Generic; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
|  | ||||
| namespace Infrastructure.Database.Applicants.Repositories | ||||
| { | ||||
|     public class ApplicantsRepository(IGenericReader reader, IGenericWriter writer, IUnitOfWork unitOfWork) | ||||
|         : GenericRepository<Applicant>(writer, unitOfWork), IApplicantsRepository | ||||
|     { | ||||
|         protected override IQueryable<Applicant> LoadDomain() | ||||
|         { | ||||
|             return reader.GetAll<Applicant>() | ||||
|                 .Include(a => a.CountryOfBirth) | ||||
|                 .Include(a => a.CityOfBirth) | ||||
|                 .Include(a => a.PlaceOfWork); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,7 @@ | ||||
| using Domains.ApplicantDomain; | ||||
| using Infrastructure.Database.Generic; | ||||
|  | ||||
| namespace Infrastructure.Database.Applicants.Repositories | ||||
| { | ||||
|     public interface IApplicantsRepository : IGenericRepository<Applicant> { } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user