/// <returns>A task that represents the asynchronous operation</returns> public virtual async Task <IActionResult> CategoryTemplateAdd(CategoryTemplateModel model) { if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageMaintenance)) { return(AccessDeniedView()); } if (!ModelState.IsValid) { return(ErrorJson(ModelState.SerializeErrors())); } var template = new CategoryTemplate(); template = model.ToEntity(template); await _categoryTemplateService.InsertCategoryTemplateAsync(template); return(Json(new { Result = true })); }