Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow update statements to set a column to null (DBNull)
  • Loading branch information
bzbetty committed Mar 9, 2012
commit 9d59f7307285486c40be9bd000072e25c9bf9313
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ private static int Update<TEntity>(ObjectContext objectContext, EntityMap entity

var parameter = updateCommand.CreateParameter();
parameter.ParameterName = parameterName;
parameter.Value = value;
parameter.Value = value ?? System.DBNull.Value;;
updateCommand.Parameters.Add(parameter);

sqlBuilder.AppendFormat("{0} = @{1}", columnName, parameterName);
Expand Down