I created an empty C# Project in Visual Studio, and added a class. Then I added a reference to the System.Data.Entity dll. I added a class to my project and proceeded to write me a DbContext Object as below. However, I get the following error message. What other dlls do I need to reference in order to use this?
Error 1 The type or namespace name ‘DbContext’ does not exist in the namespace ‘System.Data.Entity’ (are you missing an assembly reference?)
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Data.Entity;
namespace Budget.Data
{
public class BudgetContext : System.Data.Entity.DbContext
{
}
}
DbContext exists in a newer version of EntityFramework, so you need to download a newer version (or use nu-get to get it). The dll is called EntityFramework.dll