public SqLServerStoreRepository(SqlServerDBContext context, ILogger <SqLServerStoreRepository> logger)
 {
     _logger                 = logger;
     _context                = context;
     _subscriptionsStore     = new SubscriptionsStore(_context);
     _notificationsStore     = new NotificationsStore(_context);
     _messageTemplateStore   = new MessageTemplateStore(_context);
     _notificationTopicStore = new NotificationTopicStore(_context);
 }
        public static IApplicationBuilder UseSQLServerPushStore(this IApplicationBuilder app)
        {
            using (var serviceScope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope())
            {
                SqlServerDBContext context = serviceScope.ServiceProvider.GetService <SqlServerDBContext>();
                context.Database.EnsureCreated();
            }

            return(app);
        }
Exemple #3
0
 public SQLServerStore(SqlServerDBContext context, ILogger <SQLServerStore> logger)
 {
     _logger  = logger;
     _context = context;
 }