O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Model-First Design

In Visual Studio 2008, you could create a model from a database, but not a database from a model. But with Entity Framework 4.0, you can now create a database from a model, as well, by using a process called model-first design. The following steps first create a model with projects and Employees, and then they create database structures from that model.

Companion Content

Open the corresponding solution (.sln), which you can find in the \VB 2010 Developer Handbook\Chapter 27\ModelFirst folder.

  1. Create a new project of the type Console Application and name it ModelFirst.

  2. Add a new ADO.NET Entity Data Model element to the project, and name it modelFirst.edmx.

  3. In the wizard, select Empty Model, and then click Finish.

    You’ll see an empty ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required