public async Task <ActionResult> AddToCart(LocationViewModel location) { if (ModelState.IsValid) { var name = User.Identity.Name; var succuess = await _ordersService.AddToCartAsync(name, location.Id, new OrderDetail() { Start = DateTime.Now, End = DateTime.Now + TimeSpan.FromDays(10) }); if (succuess == false) { ModelState.AddModelError("Cart", "could't add location to cart"); } return(RedirectToAction("Cart")); } return(null); }