Dela via


How to: Represent Columns as Database-Generated (LINQ to SQL)

Use the LINQ to SQL IsDbGenerated property on the ColumnAttribute attribute to designate a field or property as representing a database-generated column.

For code examples, see IsDbGenerated.

To designate a field or property as representing a database-generated column

  1. Add the IsDbGenerated property to the ColumnAttribute attribute.

  2. Set the property value to true.

See Also

Concepts

The LINQ to SQL Object Model

Other Resources

How to: Customize Entity Classes by Using the Code Editor (LINQ to SQL)