Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Represent Columns as Allowing Null Values (LINQ to SQL)

Use the LINQ to SQL CanBeNull property on the ColumnAttribute attribute to specify that the associated database column can hold null values.

For code examples, see CanBeNull.

To designate a column as allowing null values

  1. Add the CanBeNull property to the ColumnAttribute attribute.

  2. Set the CanBeNull property value to true.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.