/// <summary>
 /// Create a new ContactU object.
 /// </summary>
 /// <param name="contactUsID">Initial value of the ContactUsID property.</param>
 public static ContactU CreateContactU(global::System.Int32 contactUsID)
 {
     ContactU contactU = new ContactU();
     contactU.ContactUsID = contactUsID;
     return contactU;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ContactUs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContactUs(ContactU contactU)
 {
     base.AddObject("ContactUs", contactU);
 }
        public ActionResult Contact(string userName, string userEmail, string userPhone, string userSubject, string userMsg)
        {
            ContactU objContact = new ContactU();
            objContact.Email = userEmail;
            objContact.Message = userMsg;
            objContact.MobileNumber = userPhone;
            objContact.Name = userName;
            objContact.Subject = userSubject;

            objContact.Date = DateTime.Now;
            db.ContactUs.AddObject(objContact);
            db.SaveChanges();
            return RedirectToAction("Index");


        }