Program against a database project using entity framework
Using Visual Studios 2010 I'm creating a project that has a database.
I decided to try to use one of those Database Projects that allow you to manage the datab开发者_运维技巧ase in source control along with the code.
I also think I will use entity framework as my data access tool.
Are there any good solution to tie the EF 4.0 project to the database being managed in the Database project (assuming it's a new db)?
You simply use your database project to create database for you and you use Database first approach with Entity framework (that means you will use wizard and update from database to create entity model for you).
I found Scott Guthries 'Code-first' tutorial to be quite good:
http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx
Let me know if that doesn't quite scratch the itch, I've got a couple of others bookmarked.
精彩评论