Example #1
0
        public async Task <GetProjectQueryDTO> FilterOptionsAsync([FromUri(Name = "portfolio")] string viewKey)
        {
            GetProjectQueryDTO result = null;

            using (var context = new PortfolioContext())
            {
                var config = await portfolioService.GetConfigAsync(viewKey);

                var customFields = portfolioService.GetCustomFilterLabels(config);

                result = new GetProjectQueryDTO()
                {
                    Config  = PortfolioMapper.GetProjectLabelConfigModel(config, PortfolioFieldFlags.FilterProject | PortfolioFieldFlags.FilterRequired, customLabels: customFields),
                    Options = await portfolioService.GetNewProjectOptionsAsync(config)
                };
            }
            return(result);
        }