public string SaveOrderPaymentUser(UserOrderPaymentViewModel newOrder)
        {
            User user = null;
            using(var dbContextTransaction = _dbcontext.Database.BeginTransaction())
            {
             try
            {
             user = new User { FirstName = newOrder.FirstName,LastName=newOrder.LastName,Street1Address=newOrder.Street1Address,Street2Address=newOrder.Street2Address,
                                 Email = newOrder.Email,City=newOrder.City,State=newOrder.State,Zip=newOrder.Zip,Country=newOrder.Country,
                                 PhoneNumber = newOrder.PhoneNumber,AlternateNumber=newOrder.AlternateNumber,CreatedDate = DateTime.Now.ToString("dd/MM/yyyy")};
             _dbcontext.Users.Add(user);
             _dbcontext.SaveChanges();

             OrderPayment orderPay = new OrderPayment {UserID = user.UserID,PackageId = newOrder.PackageId,Amount = newOrder.Amount,CreatedDate = DateTime.Now.ToString("dd/MM/yyyy"),
                                                       OrderStatus = EnumOrderStatus.New.ToString(),PaymentStatus = string.Empty,TransactionId = string.Empty };
               _dbcontext.Orders.Add(orderPay);
               _dbcontext.SaveChanges();
            dbContextTransaction.Commit();
            }
            catch (Exception)
            {
                dbContextTransaction.Rollback();
                throw;
            }
               }
            return user.UserID.ToString();
        }
        public IHttpActionResult PostOrderPaymentUser(UserOrderPaymentViewModel newOrder)
        {
            try
            {
                return Ok(_service.SaveOrderPaymentUser(newOrder));
            }
            catch (Exception e)
            {

                return BadRequest(e.Message);
            }
        }
 public string SaveOrderPaymentUser(UserOrderPaymentViewModel newOrder)
 {
     return _repository.SaveOrderPaymentUser(newOrder);
 }