Добавлен справочник ResponseArea
This commit is contained in:
@@ -35,7 +35,10 @@ namespace PARR.API.Controllers.V1
|
||||
{
|
||||
var paginationFilter = mapper.Map<PaginationFilter>(paginationQuery);
|
||||
|
||||
IQueryable<DAL.Models.Host> query = hostService.Get().Include(s => s.EkStatus).OrderBy(t => t.Ek);
|
||||
IQueryable<DAL.Models.Host> query = hostService.Get()
|
||||
.Include(s => s.EkStatus)
|
||||
.Include(s => s.ResponseArea)
|
||||
.OrderBy(t => t.Ek);
|
||||
|
||||
if (!string.IsNullOrEmpty(request.Mask))
|
||||
query = query.Where(t => EF.Functions.Like(t.Ek.ToLower(), SqlHelpers.RegexToLike(request.Mask)));
|
||||
|
||||
@@ -75,7 +75,8 @@ namespace PARR.API.MappingProfiles
|
||||
CreateMap<Application, ApplicationResponse>();
|
||||
|
||||
CreateMap<DAL.Models.Host, HostResponse>()
|
||||
.ForMember(d => d.Status, o => o.MapFrom(s => s.EkStatus!.Name));
|
||||
.ForMember(d => d.Status, o => o.MapFrom(s => s.EkStatus!.Name))
|
||||
.ForMember(d => d.ResponseArea, o => o.MapFrom(s => s.ResponseArea!.Name));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user