LINQ in Action roller

LINQ-to-SQL - default values & column lists

I've been having a problem with LINQ for a while, and that is the behavior of default column values. If you have a table defined to have a "DEFAULT" value, the database is supposed to insert the default value when the column is omitted from the specified column list. e.g., CREATE TABLE [dbo] . [ABC] ( [Name] [nvarchar] ( 25 ) NOT NULL, [IDNumber] INT DEFAULT(10) NOT NULL ) Under SQL, an operation like this: INSERT INTO ABC(Name, IDNumber) VALUES ('Jim', 22); will produce a row with values 'Jim', Read More...
Published Wednesday, January 30, 2008 1:55 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication