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(); } }
public void Commit() { _dbContext.SaveChanges(); }
public void UserRegister(UserDetails uobj) { _context.Add(uobj); _context.SaveChanges(); }
public void AddNotification(Notifications notifications) { _notificationDBContext.Notifications.Add(notifications); _notificationDBContext.SaveChanges(); }
public void AddNotification(Notifications obj) { _context.Add(obj); _context.SaveChanges(); }