Esempio n. 1
0
        public void Dispose()
        {
            var createdNotifications =
                context.NotificationApplications.Where(n => !preRunNotifications.Contains(n.Id))
                .Select(n => n.Id)
                .ToArray();

            foreach (var createdNotification in createdNotifications)
            {
                DatabaseDataDeleter.DeleteDataForNotification(createdNotification, context);
            }

            context.Dispose();
        }
Esempio n. 2
0
        public void Dispose()
        {
            var createdNotifications =
                context.NotificationApplications.Where(n => !preRunNotifications.Contains(n.Id))
                .Select(n => n.Id)
                .ToArray();

            foreach (var createdNotification in createdNotifications)
            {
                DatabaseDataDeleter.DeleteDataForNotification(createdNotification, context);
            }

            context.Entry(ownerUser).State  = EntityState.Deleted;
            context.Entry(sharedUser).State = EntityState.Deleted;
            context.SaveChanges();

            context.Dispose();
        }