Can I use EFCore's DBContextPool with .NET Core Console Application

239 views Asked by At

services.AddDbContextPool is the suggested practice of adding connection pool for EF Core. However, seems that this practice is only suitable for .NET MVC/Web API, etc. framework. What if I want to use it with Console Application which does not come with a Startup point? Is there any way to achieve what connection pool does without using it with MS.DI? Or what should I do to achieve that by other 3rd parties DI framework? e.g. Autofac, Ninject, Unity, etc.

0

There are 0 answers