public void CanCustomerInquiryInsert()
        {
            int isSaved = 0;
            using (var context = new CustomerInquiryRepository(new UnitOfWork()))
            {
                var cust = new CustomerInquiry
                {
                    cust_name="KK",
                    email_addr_txt="*****@*****.**",
                    //inquiry_id=1,
                    notes="Jesus is the Savior",
                    ph_nbr="",
                    rec_crt_by="KK",
                    rec_crt_ts=DateTime.UtcNow,
                    rec_upd_by="KK",
                    rec_upd_ts = DateTime.UtcNow

                };
                context.InsertOrUpdate(cust)
                ;

               isSaved = context.Save();

                Assert.AreEqual(1, isSaved);
            }
        }
        public void CanCustomerInquiryInsert()
        {
            int isSaved = 0;

            using (var context = new CustomerInquiryRepository(new UnitOfWork()))
            {
                var cust = new CustomerInquiry
                {
                    cust_name      = "KK",
                    email_addr_txt = "*****@*****.**",
                    //inquiry_id=1,
                    notes      = "Jesus is the Savior",
                    ph_nbr     = "",
                    rec_crt_by = "KK",
                    rec_crt_ts = DateTime.UtcNow,
                    rec_upd_by = "KK",
                    rec_upd_ts = DateTime.UtcNow
                };
                context.InsertOrUpdate(cust)
                ;

                isSaved = context.Save();

                Assert.AreEqual(1, isSaved);
            }
        }
        public ActionResult Inquiry([Bind(Include = "inquiry_id,cust_name,email_addr_txt,ph_nbr,notes,rec_crt_ts,rec_crt_by,rec_upd_by,rec_upd_ts")] CustomerInquiry customerInquiry)
        {
            if (ModelState.IsValid)
            {
                db.InsertOrUpdate(customerInquiry);
                db.Save();
                DisplaySuccessMessage("Success! You have sent a message.");
                return(RedirectToAction("Contact"));
            }

            DisplayErrorMessage();
            return(View(customerInquiry));
        }