开发者

VS 2010 and Entity Framework: accessing SQL Server 2000 databases

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.

VS 2010 and Entity Framework: accessing SQL Server 2000 databases

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".

VS 2010 and Entity Framework: accessing SQL Server 2000 databases

  • Is there a work-around for Visual Studio 2010 to create or use data connections to SQL Serve开发者_运维知识库r 2000 using the Entity Framework?


Unfortunately, SQL Server 2000 isn't supported.

Entity Framework v2


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜