Closed NicolasDorier closed 6 years ago
For the ASP.NET Core when we add support for senders we expect that the DbContext to come from DI.
We don't plan to add this support to the ASP.NET implementation.
The link was referencing the core branch, not ASP.NET MVC.
The Core branch does not include any changes to the senders. When we convert them to ASP.NET Core, DI will be the default and the DbContext
s can be added however you prefer.
The default DI implementation in ASP.NET Core supports types, instances, and lambda expression factories. You may also use another DI implementation.
DbWebHookStore should allow the user to either overrides or inject how to create the DBContext. I would say the .NET Core way of doing would be able to inject
DbContextOptionsBuilder<TContext>
. This can be used to create a new DBContext.https://github.com/aspnet/WebHooks/blob/dougbu/add.core.II/src/Microsoft.AspNet.WebHooks.Custom.SqlStorage/WebHooks/DbWebHookStore.cs