My intellisense is not appearing for my DbSet class.

DBContext db = new DBContext();
IEnumerable<Element> elements = db.Elements.[NO INTELLISENSE HERE]

The fully qualified name is System.Data.Entity.DbSet.

I have a reference to System.Web.Mvc at the top of my file.

The code compiles and runs without any issues.

What is the problem here and/or how to I go about debugging it and then fixing it?

有帮助吗?

解决方案

You need to add a reference to the entity framework lib (to the project where your code resides).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top