Пример #1
0
        public IViewComponentResult Invoke(string widgetZone, object additionalData = null)
        {
            var model = _widgetWebService.PrepareRenderWidget(widgetZone, additionalData);

            if (!model.Any())
            {
                return(Content(""));
            }

            return(View(model));
        }
Пример #2
0
        public virtual async Task <IViewComponentResult> WidgetsByZone(string widgetZone, object additionalData = null)
        {
            var model = /*await*/ _widgetWebService.PrepareRenderWidget(widgetZone, additionalData);

            if (model == null)
            {
                return(Content(""));
            }

            return(View(nameof(WidgetsByZone), model));
        }