TypeLoadException .NET Core Issue

Hi all,

Please help me, I have some issues when develop a new site using .NET Core. At this moment, I use asphostportal cloud shared hosting.

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’.

Thanks.

Welcome to the forum.

This forum is focused on the FCC curriculum which is based around the MERN stack. We don’t teach .NET. You’re welcome to ask the question, and there are a lot of sharp men and women here with various background so you might get an answer, but don’t be surprised if you you don’t. You might have better luck on a site devoted to .NET or on Stack Overflow where there will be a lot more people with knowledge about this particular subject.

Best of luck.