public ActionResult GetVideos([DataSourceRequest] DataSourceRequest request, int periodSelectionKind, int?userId = null, bool?attachedOnly = null) { var kind = periodSelectionKind.ToPeriodSelectionKind(); var list = _reportServices.GetVideosReport(kind, userId, (attachedOnly == null || (bool)!attachedOnly ? (bool?)null : true)); return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }