Example #1
0
        public async Task MigrateAsync()
        {
            if (!_options.EnableInbox && !_options.EnableOutbox)
            {
                return;
            }

            if (_options.EnableInbox)
            {
                IContextWithEventInbox context = _sp.GetRequiredService <IContextWithEventInbox>();
                if ((await context.Context.Database.GetAppliedMigrationsAsync()).All(x => x != InboxMigrationName))
                {
                    await MigrateInboxAsync(context);
                }
            }

            if (_options.EnableOutbox)
            {
                IContextWithEventOutbox context = _sp.GetRequiredService <IContextWithEventOutbox>();
                if ((await context.Context.Database.GetAppliedMigrationsAsync()).All(x => x != OutboxMigrationName))
                {
                    await MigrateOutboxAsync(context);
                }
            }
        }
Example #2
0
 public EfInboxEventStore(IContextWithEventInbox db)
 {
     _db = db;
 }
Example #3
0
 private Task MigrateInboxAsync(IContextWithEventInbox context)
 {
     //TODO:throw new NotImplementedException();
     return(Task.CompletedTask);
 }