public static void Main(string[] args) { Log.Logger = new LoggerConfiguration().ReadFrom.Configuration(Configuration).CreateLogger(); try { var host = CreateHostBuilder(args).Build(); var scope = host.Services.CreateScope(); var serviceProvider = scope.ServiceProvider; LinkDbContext linkDbContext = serviceProvider.GetRequiredService <LinkDbContext>(); linkDbContext.Database.Migrate(); LinkLogDbContext linkLogDbContext = serviceProvider.GetRequiredService <LinkLogDbContext>(); linkLogDbContext.Database.Migrate(); host.Run(); } catch (Exception exception) { Log.Fatal(exception, "Host terminated unexpectedly"); } finally { Log.CloseAndFlush(); } }
public LinkApiRepository(LinkDbContext context) { _context = context; }
public LinkRepository(IHashDecoder hashDecoder, IHashEncoder hashEncoder, LinkDbContext context) { _context = context; _hashDecoder = hashDecoder; _hashEncoder = hashEncoder; }
public EfLinkQueryRepository(LinkDbContext dbContext) { this._dbContext = dbContext; }
public EfLinkCommandRepository(LinkDbContext dbContext, ILogger <EfLinkCommandRepository> logger) { this._dbContext = dbContext; this._logger = logger; }
public LinksController(LinkDbContext context) { _linkDbContext = context; }
public LinkRepository(LinkDbContext linkDbContext) { DbContext = linkDbContext; }