public async Task <ActionResult> NewTemplateObjectFormat(string tabId, int parentId, IFormCollection collection) { var format = _formatService.NewTemplateObjectFormatPropertiesForUpdate(parentId, _formatService.IsSiteDotNetByObjectId(parentId)); var model = ObjectFormatViewModel.Create(format, tabId, parentId, _formatService, false); await TryUpdateModelAsync(model); if (ModelState.IsValid) { model.Data = _formatService.SaveObjectFormatProperties(model.Data); PersistResultId(model.Data.Id); return(Redirect("TemplateObjectFormatProperties", new { tabId, parentId, id = model.Data.Id, successfulActionCode = ActionCode.SaveTemplateObjectFormat })); } return(await JsonHtml("Properties", model)); }