public void addOverpaymentDetail(OverpaymentDetailAdd overpaymentDetail)
        {
            var conn = new mainEntities();

            conn.Database.Connection.Open();
            var overpaymentDetailDB = conn.OverpaymentDetails;
            var overpayment         = new OverpaymentDetail()
            {
                OverPaymentID  = overpaymentDetail.OverPyamentID,
                MemberId       = overpaymentDetail.MemberId,
                ClaimNumber    = overpaymentDetail.ClaimNumber,
                BalanceAmt     = overpaymentDetail.BalanceAmt,
                OverPaymentAmt = overpaymentDetail.OverPaymentAmt,
                SysSrcSyncDate = DateTime.Today,
                LastUpdated    = DateTime.Today
            };

            overpaymentDetailDB.Add(overpayment);
        }
        public void PostOverPaymentDetail([FromBody] OverpaymentDetailRequest overpaymentDetailRequest)
        {
            var overpaymentDetailAdd = new OverpaymentDetailAdd
            {
                OverPyamentID  = overpaymentDetailRequest.OverPyamentID,
                MemberId       = overpaymentDetailRequest.MemberId,
                ClaimNumber    = overpaymentDetailRequest.ClaimNumber,
                BalanceAmt     = overpaymentDetailRequest.BalanceAmt,
                OverPaymentAmt = overpaymentDetailRequest.OverPaymentAmt
            };
            //overpaymentService.addOverpaymentDetail(overpaymentDetailAdd);
            var conn = new mainEntities();

            conn.Database.Connection.Open();
            var overpaymentDetailDB = conn.OverpaymentDetails;
            var overpayment         = new OverpaymentDetail()
            {
                OverPaymentID  = overpaymentDetailRequest.OverPyamentID,
                MemberId       = overpaymentDetailRequest.MemberId,
                ClaimNumber    = overpaymentDetailRequest.ClaimNumber,
                BalanceAmt     = overpaymentDetailRequest.BalanceAmt,
                OverPaymentAmt = overpaymentDetailRequest.OverPaymentAmt,
                SysSrcSyncDate = DateTime.Today,
                LastUpdated    = DateTime.Today
            };

            overpaymentDetailDB.Add(overpayment);
            conn.SaveChanges();
            conn.Dispose();


            //var conn = new System.Data.SQLite.SQLiteConnection("data source=C:/inetpub/wwwroot/OverpaymentAPISite/OverpaymentDetail.db");
            //using (var cmd = new SQLiteCommand(conn))
            //{
            //    conn.Open();
            //    cmd.CommandText = "INSERT INTO OverPaymentDetail(OverPaymentID, ClaimNumber, MemberId, BalanceAmt, OverPaymentAmt) Values("
            //        + overpaymentDetailRequest.OverPyamentID.ToString() + ", " + overpaymentDetailRequest.ClaimNumber.ToString() + ", " + overpaymentDetailRequest.MemberId.ToString() + ", " + overpaymentDetailRequest.BalanceAmt.ToString() + ", " + overpaymentDetailRequest.OverPaymentAmt.ToString() + ")";
            //    cmd.ExecuteNonQuery();
            //    conn.Close();
            //}
        }