public DoctorDto GetDoctor(Guid nodeGuid) { return(DocumentQueryService.GetDocument <CMS.DocumentEngine.Types.MedioClinic.Doctor>(nodeGuid) .AddColumns(_doctorColumns) .Select(DoctorDtoSelect) .FirstOrDefault()); }
public SchoolDto GetSchool(Guid nodeGuid) { return(DocumentQueryService.GetDocument <CMS.DocumentEngine.Types.MedioClinic.School>(nodeGuid) .AddColumns(_schoolColumns) .Select(SchoolDtoSelect) .FirstOrDefault()); }
public ArticleDto GetArticle(Guid nodeGuid) { return(DocumentQueryService.GetDocument <CMS.DocumentEngine.Types.MedioClinic.Article>(nodeGuid) .AddColumns(_articleColumns) .Select(ArticleDtoSelect) .FirstOrDefault()); }
public TLandingPageDto GetLandingPage <TKenticoLandingPage, TLandingPageDto> (string pageAlias, Func <DocumentQuery <TKenticoLandingPage>, DocumentQuery <TKenticoLandingPage> > queryModifier = null, Func <TKenticoLandingPage, TLandingPageDto, TLandingPageDto> selector = null) where TKenticoLandingPage : TreeNode, new() where TLandingPageDto : LandingPageDto, new() { var query = DocumentQueryService.GetDocument <TKenticoLandingPage>(pageAlias) .AddColumns("DocumentID", "DocumentName"); if (queryModifier != null) { query = queryModifier(query); } Func <TKenticoLandingPage, TLandingPageDto> completeSelector = (landingPage) => { var dto = new TLandingPageDto { DocumentId = landingPage.DocumentID, Title = landingPage.DocumentName }; return(selector != null?selector(query, dto) : dto); }; return(query .Select(completeSelector) .FirstOrDefault()); }
public LandingPageDto GetLandingPageDto(string pageAlias) { return(DocumentQueryService.GetDocument <CMS.DocumentEngine.Types.MedioClinic.LandingPage>(pageAlias) .AddColumns("DocumentID", "DocumentName") .ToList() .Select(lp => Mapper.Map <LandingPageDto>(lp)) .FirstOrDefault()); }
public LandingPageDto GetLandingPage(string pageAlias) { return(DocumentQueryService.GetDocument <CMS.DocumentEngine.Types.MedioClinic.LandingPage>(pageAlias) .AddColumns("DocumentID", "DocumentName") .ToList() .Select(landingPage => new LandingPageDto() { DocumentId = landingPage.DocumentID, Title = landingPage.DocumentName }) .FirstOrDefault()); }