Example #1
0
        public IEnumerable <ApplicationGetDto> Handle(GetSiteApplications query)
        {
            query.ThrowIfNull(GetType().Name);
            var site = _siteFacade.GetSite(query.SiteName);

            site.ThrowIfNull(query.SiteName);
            var applications    = _applicationFacade.GetSiteApplications(site);
            var applicationsDto = applications.Select(_mapper.Map <ApplicationGetDto>);

            return(applicationsDto.OrderBy(x => x.Name));
        }
        public ActionResult Get([FromRoute] GetSiteApplications query)
        {
            var applicationsDto = QueryDispatcher.Dispatch(query);

            return(Ok(applicationsDto));
        }