VS 2010 and Entity Framework: accessing SQL Server 2000 databases

孤者浪人 提交于 2019-12-10 15:26:13

问题


Consider a Visual Studio 2010 project whose requirement is to model the data using Entity Framework. The datasource is a SQL Server 2000 database.

The first step is creating a new ADO.NET Entity Data Model item.

The Entity Data Model Wizard prompts for a Data Connection.

When creating a new Connection, you will need to use a provider other than SqlClient. Usually it's SQLOLEDB.

The list of data providers only has SqlClient or ".NET Framework Data Provider for SQL Server".

  • Is there a work-around for Visual Studio 2010 to create or use data connections to SQL Server 2000 using the Entity Framework?

回答1:


Unfortunately, SQL Server 2000 isn't supported.

Entity Framework v2




回答2:


We were able to use EF with sql 2000 by setting up the initial context in vs2005, then doing an upgrade to vs 2010. Terrible, but worked.

UPDATE:

I decided to write a how-to for anyone else needing to do this. We haven't seen any side effects yet, and allows the use of the VS 2010 designer.

How To Use Entity Framework 4 With Visual Studio 2010 and SQL Server 2000



来源:https://stackoverflow.com/questions/2829890/vs-2010-and-entity-framework-accessing-sql-server-2000-databases

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!