O'Reilly logo

Visual Basic 2008 Recipes: A Problem-Solution Approach by Rakesh Rajan, Matthew MacDonald, Allen Jones, Todd Herman

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

8.11. Create a Database Object Model

Problem

You need to create objects that map directly to tables in a relational database.

Solution

Use the Object Relational Designer (O/R Designer) to automatically generate .NET classes that map directly to tables within the target database.

How It Works

LINQ to SQL, the Language Integrated Query (see Chapter 6) API, provides integrated query support for databases. It accomplishes this by using object classes, created in any .NET language, that tightly map to tables in a database. Instead of creating string-based commands to collect or change data in a database, as shown in the earlier recipes in this chapter, you simply change property values or create new instances of the mapped object classes.

Although ...

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