Sql – How to assign null to sql entity columns

linqlinq-to-sql

I have generated linq to sql entites but cannot figure out how to assign null to a nullable column. whenever i try to assign null to it it says "there is no implicit type conversion between int and ". BTW the type of the field is int? and the database column is also nullable.

Best Answer

Try to assign it System.DBNull instead

Related Topic