Пример #1
0
        private void SaveNotificationInDatabase(Notification notification)
        {
            var options = new DbContextOptionsBuilder <NtbsContext>();

            options.UseSqlServer(Settings.EnvironmentConfig.ConnectionString);
            using (var context = new NtbsContext(options.Options))
            {
                context.Add(notification);
                context.SaveChanges();
            }
            TestContext.AddedNotificationIds.Add(notification.NotificationId);
        }