예제 #1
0
        /// <summary>
        /// Update a web notification
        /// </summary>
        /// <param name="domain"></param>
        public void Update(WebNotificationDomain domain)
        {
            WebNotification webNotification = _context.WebNotification.FirstOrDefault(x => x.WebNotificationId == domain.Id);

            webNotification.FromDomainModel(domain);
            _context.SaveChanges();
        }
예제 #2
0
 /// <summary>
 /// Update multiple web notifications
 /// </summary>
 /// <param name="domains"></param>
 public void Update(ICollection <WebNotificationDomain> domains)
 {
     foreach (WebNotificationDomain domain in domains)
     {
         WebNotification webNotification = _context.WebNotification.FirstOrDefault(x => x.WebNotificationId == domain.Id);
         webNotification.FromDomainModel(domain);
     }
     _context.SaveChanges();
 }