public async Task <ActionResult> InsertSection([FromBody] SectionDto toInsert) { if (!this.HttpContext.Session.HasSystemActionRights() || !this.HttpContext.Session.HasSystemActionRight(ActionRights.SystemManagement)) { return(RedirectToAction("Index", "Home")); } var sectionId = await SectionManager.AddNewSectionAsync(toInsert); if (sectionId > 0) { _cache.Remove(CacheKeys.AllSections); toInsert.SectionID = sectionId; } // jsGrid requires the inserted object as return value. return(Json(toInsert)); }