Developers using Visual Studio can use the Object Relational Designer to create or customize their entity classes.
You can also use the Visual Studio code editor to write your own mapping code or to customize code that has already been generated. For more information, see Attribute-Based Mapping.
The topics in this section describe how to customize your object model.
How to: Specify Database Names
Describes how to use Name.
How to: Represent Tables as Classes
Describes how to use TableAttribute.
How to: Represent Columns as Class Members
Describes how to use ColumnAttribute.
How to: Represent Primary Keys
Describes how to use IsPrimaryKey.
How to: Map Database Relationships
Provides examples of using the AssociationAttribute attribute.
How to: Represent Columns as Database-Generated
Describes how to use IsDbGenerated.
How to: Represent Columns as Timestamp or Version Columns
Describes how to use IsVersion.
How to: Specify Database Data Types
Describes how to use DbType.
How to: Represent Computed Columns
Describes how to use Expression.
How to: Specify Private Storage Fields
Describes how to use Storage.
How to: Represent Columns as Allowing Null Values
Describes how to use CanBeNull.
How to: Map Inheritance Hierarchies
Describes the mappings required to specify an inheritance hierarchy.
How to: Specify Concurrency-Conflict Checking
Describes how to use UpdateCheck.
SqlMetal.exe (Code Generation Tool)