How to pass null values into stored procedure via Entity Framework?
问题 I am using an ASP.NET MVC 4 application with Entity Framework. I want to pass null values conditionally, let's say if pass value into DeptID then it should list of values for only passed DeptID , and if pass DeptID = NULL then it should it all the departments. I wrote a procedure by checking DeptID and it returns the desired output (if DeptID is null , then all rows are returned). But problem is to when I want to pass null values through following code of Entity Framework it is not working.