public async Task <ActionResult> AddEdit(ResourceModel model) { bool response = false; if (model.IsNew) { response = await ApiUtility.PostAsync <ResourceModel>(Services.Resources, model); } else { response = await ApiUtility.PutAsync <ResourceModel>(Services.Resources, model); } if (response) { return(RedirectToAction("List")); } return(View(model)); }