I use EF model-first in my application and use stored procedures too.
My table has a LastStatus
column name of datetime
datatype and it's nullable.
When the user fills in a datetime
value, it works correctly.
Here is my code :
(@StartAcceptDate IS NULL OR LastStatusDate >= @StartAcceptDate)
AND (@EndAcceptDate IS NULL OR LastStatusDate >= @EndAcceptDate)
But when user want to select all record release the date.
Many records have null
value.
My question is here: how to pass null
as a datetime
from C# to SQL Server?