public ActionResult Create([Bind(Include = "id,type,value,time,enabled")] Notification notification)
        {
            if (ModelState.IsValid)
            {
                db.Notifications.Add(notification);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(notification));
        }
        private void SaveToTrackingTableFirstSendDate(Models.Recipient recipient)
        {
            var record = _notificationDbContext.LobEmailTrackings.FirstOrDefault(x => x.Owner == recipient.AzurePackId);

            if (record == null)
            {
                _notificationDbContext.LobEmailTrackings.Add(new LobEmailTracking
                {
                    Owner         = recipient.AzurePackId,
                    FirstSendDate = DateTime.Today
                });
                _notificationDbContext.SaveChanges();
            }
        }
Beispiel #3
0
 public void Commit()
 {
     _dbContext.SaveChanges();
 }
Beispiel #4
0
 public void UserRegister(UserDetails uobj)
 {
     _context.Add(uobj);
     _context.SaveChanges();
 }
Beispiel #5
0
 public void AddNotification(Notifications notifications)
 {
     _notificationDBContext.Notifications.Add(notifications);
     _notificationDBContext.SaveChanges();
 }
 public void AddNotification(Notifications obj)
 {
     _context.Add(obj);
     _context.SaveChanges();
 }