Monday, June 2, 2014

How to solve problem, Invalid column name 'Discriminator'?

Get this error while upgrade Entity Framework from 5.0 to 6.x.
Install Entity Framework by Nuget. The version got is 6.1

Then get this weird error: Invalid column name 'Discriminator'
All of fields for that table are in the database table, so [NotMapped] is not applicable in here

The solution to me is to revert to 6.02, problem solved.

How to solve problem, "No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'."

Entity framework is using older version 5.0 and on .Net 4.0, need to install a new one.

Go to Package Manager Console:
Run
Install-Package EntityFramework