Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Facing multiple issues with the project created using Generic repository pattern and UOW

$
0
0

Hello all I have created a project using generic repository pattern with UOW which is in github 

RepositoryUOW

First issue I am facing is TypeLoadException: Could not load type 'System.Data.Common.DbProviderFactories' from assembly 'System.Data, Version=4.0.0.0, 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 have tried all the possible ways but no luck so can some one help me on this


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>