Esempio n. 1
0
        public void Update(tbl_Contact contact)
        {
            tbl_Activity notification = new tbl_Activity();

            notification.Description = $"New forum post - {contact} - received on {DateTime.Now}";
            notification.Time        = DateTime.Now;
            db.tbl_Activity.Add(notification);
            db.SaveChanges();
        }
Esempio n. 2
0
        public int AddActivity(ActivityModel model)
        {
            var activity = new tbl_Activity()
            {
                Activity = model.Activity
            };

            this.db.TblActivity.Add(activity);
            this.db.SaveChanges();

            return(activity.IdActivity);
        }