Esempio n. 1
0
        public GetLeadByIdResultDto Execute(GetLeadByIdDto dto)
        {
            GetLeadByIdResultDto result = new GetLeadByIdResultDto {
                Status = true
            };
            LeadDto lst = unit.Lead.GetLeadById(dto);

            result.Object = lst;
            return(result);
        }
Esempio n. 2
0
 public LeadDto GetLeadById(GetLeadByIdDto dto)
 {
     return(ctx.Leads.
            Where(p => p.Id == dto.Id.ToGuid()).
            Include(p => p.StoreImages).ThenInclude(p => p.Document).
            Include(p => p.StoreCategories).ThenInclude(p => p.StoreCategory).
            Include(p => p.User).
            Select(p => DtoBuilder.CreateLeadDto(p)).
            FirstOrDefault());
 }
Esempio n. 3
0
 public ActionResult <GetLeadByIdResultDto> GetLeadById([FromQuery] GetLeadByIdDto dto)
 {
     return(getLeadById.Execute(dto));
 }