.net - EF Core says no service for type 'MyDatabaseProviderServices' has been registered -


i writing database provider entity framework core 1.1.2, , have following issue.

i have addentityframeworkmyprovider() extension method (on iservicecollection) think called properly. in method register own database provider.

services.tryaddenumerable(     servicedescriptor.singleton<idatabaseprovider,              databaseprovider<mydatabaseproviderservices, mydatabaseoptionsextension>>()); 

however when want use provider, invalidoperationexception saying no service type 'mydatabaseproviderservices' has been registered.

based on callstack, exception occurs @ getrequiredservice<mydatabaseproviderservices>() function call.

it interesting mydatabaseproviderservices' constructor never called, not surprised exception. right, , know object of type should instantiated?

by way, try follow officially recommended efcore 1.1 database provider "guideline" doing same way: https://blog.oneunicorn.com/2016/11/11/so-you-want-to-write-an-ef-core-provider/ can problem be?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -