Example #1
0
        public static void Insert(ContactUsMessage msg)
        {
            using (var db = OnlineStoreDbContext.Entity)
            {
                db.ContactUsMessages.Add(msg);

                db.SaveChanges();
            }
        }
Example #2
0
        public static void Update(ContactUsMessage message)
        {
            using (var db = OnlineStoreDbContext.Entity)
            {
                var orgComment = db.ContactUsMessages.Where(item => item.ID == message.ID).Single();

                orgComment.ContactUsMessageStatus = message.ContactUsMessageStatus;
                orgComment.Answer     = message.Answer;
                orgComment.LastUpdate = message.LastUpdate;

                db.SaveChanges();
            }
        }