This topic has not yet been rated - Rate this topic

Creating the Object Model

You can create your object model from an existing database and use the model in its default state. You can also customize many aspects of the model and its behavior.

If you are using Visual Studio, you can use the Object Relational Designer to create your object model. How to: Create LINQ to SQL Classes Mapped to Tables and Views (O/R Designer)
How to: Create LINQ to SQL Classes Mapped to Tables and Views (O/R Designer)

In This Section

How to: Generate the Object Model in Visual Basic or C#
Describes how to use the SQLMetal command-line tool. Also provides a link to the Object Relational Designer for Visual Studio users

How to: Generate the Object Model as an External File
Describes how to generate an external mapping file instead of using attribute-based mapping.

How to: Generate Customized Code by Modifying a DBML File
Describes how to generate Visual Basic or C# code from a DBML metadata file.

How to: Validate DBML and External Mapping Files
Describes how to validate mapping files that you have modified (advanced).

How to: Make Entities Serializable
Describes how to add appropriate attributes to make entities serializable.

How to: Customize Entity Classes by Using the Code Editor
Describes how to use the code editor to write your own mapping code, or customize code that has been autogenerated.

Related Sections

The LINQ to SQL Object Model
Provides details about the LINQ to SQL object model.

Typical Steps for Using LINQ to SQL
Explains the typical steps that you follow to implement a LINQ to SQL application.



Copyright © 2012 by Microsoft Corporation. All rights reserved.


Build Date:

2012-08-02
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.