예제 #1
0
        public GetHtmlContentWidgetOptionsResponse Get(GetHtmlContentWidgetOptionsRequest request)
        {
            var results = WidgetOptionsHelper.GetWidgetOptionsResponse(repository, request.WidgetId, request);

            return(new GetHtmlContentWidgetOptionsResponse {
                Data = results
            });
        }
예제 #2
0
        public GetHtmlContentWidgetOptionsResponse Get(GetHtmlContentWidgetOptionsRequest request)
        {
            var results = repository
                          .AsQueryable <ContentOption>(o => o.Content.Id == request.WidgetId)
                          .Select(o => new OptionModel
            {
                Key          = o.Key,
                DefaultValue = o.DefaultValue,
                Type         = (OptionType)(int)o.Type
            })
                          .ToDataListResponse(request);

            return(new GetHtmlContentWidgetOptionsResponse {
                Data = results
            });
        }