// GET: Admin/Brand public ActionResult AddBrand(Guid?id) { try { if (id == null) { return(View(new Brand())); } else { var brand = ApiUtil.GetBrand(id.Value)?.Result; return(View(brand)); } } catch (Exception ex) { return(RedirectToAction("Index", new RouteValueDictionary(new { controller = "ErrorHandler", action = "Index", data = ex.InnerException?.Message ?? ex.Message }))); } }