How should i start using entity framework?
I am actually now using the typical SqlDataReader
to fetch my data with visual studio 2005 but I want to start using the entity-framework. Are there any programs or backs I should 开发者_JAVA百科download or install to do so?
Besides that, if i want to continue using my way is that a good idea?
thanxx
The entity framework I believe requires .net framework 3.5. There were some CTPs for VS2005 you might be able to get a hold of. Otherwise I think VS2008 or VS2010 would be your best bet.
Here is a nice introduction for VS2008 link text
In vs2005 you can't but If you have VS2008 you could download VS 2008 Service pack to work with EF, and if you have VS2010, It will be installed by default.
After installing it See Code First, there are lot of a resources with code first. Also for startup is good too see google search and MSDN.
I think everything you need is built into Visual Studio (though you'll probably want a newer version). Use Google to find a tutorial like this one, which will show you how to create and use an entity context based on your current SQL schema, and you should be on your way!
The Entity Framework takes a little getting used to (you have to remember that execution of LINQ queries is deferred!), but I've been using it for a couple of years now and it's hugely better than old-style data access methods. I definitely recommend it.
精彩评论