Beispiel #1
0
        private AboutWidgetModel[] GetWidgets(uint serviceId)
        {
            var widgets = _widgetRepository.GetWidgetsByServiceId(serviceId, 0, 100);

            return(widgets.Select(widget => new AboutWidgetModel
            {
                Name = widget.Name,
                Params = _widgetParamRepository.GetWidgetParamByWidgetId(widget.Id).Param
            }).ToArray());
        }
        public WidgetParamModel GetWidgetParam(uint widgetId)
        {
            var widget = _widgetRepository.GetWidgetById(widgetId);

            return(widget != null?_widgetParamRepository.GetWidgetParamByWidgetId(widgetId) : null);
        }