I am developing a we application using web form and database first approach (linq to sql). I have not been able to get the DbContext class. I could not reference it. I have visual studion 2010 service pack 1 and MVC 3 installed.

What am I doing wrong?

有帮助吗?

解决方案

DbContext is a class from Entity Framework. With Linq to SQL you should look for DataContext. Thus you are using Database First approach, there should be class inherited from DataContext. Search it under .dbml file in Solution Explorer. If you have Northwind.dbml then generated context class should have name NorthwindDataContext.

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