public ActionResult Widgets(string query) { var request = new GetRecentWidgetAndWidgetCategoryRequest { Filter = query }; var model = GetCommand<GetRecentWidgetAndWidgetCategoryCommand>().ExecuteCommand(request); return PartialView(model); }
public ActionResult SelectWidget(GetRecentWidgetAndWidgetCategoryRequest request) { var model = GetCommand<GetRecentWidgetAndWidgetCategoryCommand>().ExecuteCommand(request); var view = model != null ? RenderView("SelectWidget", model) : string.Empty; var result = ComboWireJson(model != null, view, model, JsonRequestBehavior.AllowGet); result.MaxJsonLength = int.MaxValue; // TODO: very large JSON ~2.1MB on test environment!!! // var scriptSerializer = new JavaScriptSerializer(); // if (result.MaxJsonLength.HasValue) // { // scriptSerializer.MaxJsonLength = result.MaxJsonLength.Value; // } // var jsonString = scriptSerializer.Serialize(result.Data); return result; }