//----------------------------------------------------------------------- // // Copyright (c) lanedirt. All rights reserved. // Licensed under the MIT license. See LICENSE.md file in the project root for full license information. // //----------------------------------------------------------------------- namespace AliasServerDb; using Microsoft.EntityFrameworkCore; /// /// The AliasServerDbContextFactory interface. /// public interface IAliasServerDbContextFactory { /// /// Creates a new AliasServerDbContext. /// /// The AliasServerDbContext. AliasServerDbContext CreateDbContext(); /// /// Configures the DbContext options. /// /// The DbContextOptionsBuilder. void ConfigureDbContextOptions(DbContextOptionsBuilder optionsBuilder); /// /// Creates a new AliasServerDbContext asynchronously. /// /// The cancellation token. /// A task that represents the asynchronous operation. The task result contains the AliasServerDbContext. Task CreateDbContextAsync(CancellationToken cancellationToken = default); }