Beispiel #1
0
        public async Task <ActionResult> FullPurchase(int bikeId)
        {
            BikeModel bikeModel = await _modelManager.GetBikeDetails(bikeId);

            var customerModel = await _modelManager.GetCustomer(User.Identity.Name);

            TransactionModel transactionModel = new TransactionModel
            {
                CustomerId = customerModel.CustomerId,
                BikeId     = bikeId,
                BikePrice  = bikeModel.BikePrice
            };

            // TempData.Keep("CustumerId");
            ViewBag.Customer = customerModel;
            ViewBag.transc   = bikeModel;
            await _modelManager.AddTransaction(transactionModel);

            return(View());
        }