public async System.Threading.Tasks.Task <ActionResult> AddBrand(AddEditBrandViewModel model) { try { var postResult = ConstantHelpers.PostUrlAsync(Baseurl, "SAV/brands", model).Result; if (postResult.Message.Equals("Success")) { return(RedirectToAction("ListBrand", "Brand")); } return(View(model)); } catch (Exception ex) { TryUpdateModel(model); return(View(model)); } }
public async System.Threading.Tasks.Task <ActionResult> AddBrand() { var vm = new AddEditBrandViewModel(); return(View(vm)); }