public ActionResult Create(EditBasketModel model) { try { if (ModelState.IsValid) { _customer.AddBasket(_mapper.Map <BasketDTO>(model)); return(RedirectToAction("Index")); } return(View(model)); } catch (Exception ex) { ModelState.AddModelError(string.Empty, $"An exception has occurred: {ex}"); return(View(model)); } }