Installation
Install and register EF Core persistence for TickerQ.
Install
dotnet add package TickerQ.EntityFrameworkCoreRegister
Chain .AddOperationalStore() on TickerOptionsBuilder:
builder.Services.AddTickerQ(opt =>
{
opt.AddOperationalStore(ef =>
{
ef.UseTickerQDbContext<TickerQDbContext>(db =>
db.UseSqlServer(builder.Configuration.GetConnectionString("Default"),
sql => sql.MigrationsAssembly("MyApp")));
});
});This uses a dedicated TickerQDbContext with its own connection. For sharing your app's existing DbContext, see DbContext Setup.
Options
| Method | Default | Description |
|---|---|---|
UseTickerQDbContext<T>(Action<DbContextOptionsBuilder>, string?) | — | Dedicated TickerQ database context |
UseApplicationDbContext<T>(ConfigurationType) | — | Share your app's DbContext |
SetDbContextPoolSize(int) | 1024 | Connection pool size |
SetSchema(string) | "ticker" | Database schema for all TickerQ tables |