public GetLeadByIdResultDto Execute(GetLeadByIdDto dto) { GetLeadByIdResultDto result = new GetLeadByIdResultDto { Status = true }; LeadDto lst = unit.Lead.GetLeadById(dto); result.Object = lst; return(result); }
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()); }
public ActionResult <GetLeadByIdResultDto> GetLeadById([FromQuery] GetLeadByIdDto dto) { return(getLeadById.Execute(dto)); }