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); } } }
public EfInboxEventStore(IContextWithEventInbox db) { _db = db; }
private Task MigrateInboxAsync(IContextWithEventInbox context) { //TODO:throw new NotImplementedException(); return(Task.CompletedTask); }