public IActionResult SaveBillingDetails(UserBilling userBill) { userBill.CreatedDate = DateTime.UtcNow; var user = HttpContext.AuthenticateAsync(CookieAuthenticationDefaults.AuthenticationScheme).Result; var userId = user.Principal.Claims.FirstOrDefault(x => x.Type == ClaimTypes.Sid).Value; userBill.TotalBill = _vegeBusinessAccess.GetUserTotal(Convert.ToInt64(userId)); _vegeBusinessAccess.SaveBillingDetails(userBill); List <UserCart> userCartList = _vegeBusinessAccess.GetUserProducts(Convert.ToInt64(userId)); foreach (var item in userCartList) { _vegeBusinessAccess.UpdateProductQuantity(item.ProductId, item.Quantity); } return(View("OrderSuccess")); }
public int SaveBillingDetails(UserBilling userBill) { _vegeDbContext.UserBilling.Add(userBill); return(_vegeDbContext.SaveChanges()); }
public int SaveBillingDetails(UserBilling userBill) { return(_vegeDataAccess.SaveBillingDetails(userBill)); }