/// <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(); }
/// <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(); }