TickerQ EF Core
Installation
TickerQ.EntityFrameworkCore is a package that extends the functionality of TickerQ.
You can install it with:
cli> dotnet add package TickerQ.EntityFrameworkCore
pmPM> NuGet\Install-Package TickerQ.EntityFrameworkCore
pm<PackageReference Include="TickerQ.EntityFrameworkCore" Version="*" />
Configure Options
Add options in TickerQ.
csharp
using TickerQ.DependencyInjection;
using TickerQ.EntityFrameworkCore.DependencyInjection;
....
services.AddTicker(opt =>
{
....
// Define the DbContext to use for storing Tickers.
opt.AddOperationalStore<MyDbContext>();
// Set fallback time out to check for missed jobs and execute.
opt.SetTimeOutJobChecker(timeSpan: ...);
// Set name of instance, default is Environment.MachineName.
opt.SetInstanceIdentifier(identifierName: ...)
});
Add Migrations
Migrations would be created for Context
that is declared at AddOperationalStore
.
PM
PM> add-migration "InitialCreate" -c MyDbContext