public ActionResult Edit(SocialMediaManageModel model, SubmitType submit) { if (ModelState.IsValid) { var response = _socialMediaService.SaveSocialMedia(model); SetResponseMessage(response); if (response.Success) { switch (submit) { case SubmitType.Save: return(RedirectToAction("Index")); default: return(RedirectToAction("Edit", new { id = model.Id })); } } } return(View(model)); }