Generic repository pattern with core MVC

Hello all I have created a project which is here, I am getting some excpetion while executing the application can some one help me on this

Hi @github743,

Could you give some more details? At the very least, could you tell us what exception you’re running into?


First issue I am facing is TypeLoadException: Could not load type ‘System.Data.Common.DbProviderFactories’ from assembly ‘System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.

I have commented this line in my startup.cs

services.AddTransient((_) => new DatabaseContext());

Then I am getting the following error as follows

An unhandled exception occurred while processing the request. InvalidOperationException: Unable to resolve service for type ‘CoreApp.DataProvider.DataContext.DatabaseContext’ while attempting to activate ‘CoreApp.DataProvider.EmployeeDataProvider’.

I resolved the issue,as I have created the class library with .NET Framework it is causing the issue. I have created new class library with class library with .NET Standard and it is working as expected