sql - How to use null in join condition in linq -


I'm having trouble translating this SQL statement into a linq query. I have not found a way that I Zero or use in the JOIN position. Here is the sample SQL statement:

SELECT a. * From a table A to TableB b (a.Id = b.Id) or a.Id is NULL

What will be the same linq statement? I am looking for a cover which is similar to one of the above SQL statements.

Add B on TableB to one of TableA ??? equal ??? Select one;

I have searched for an existing term, but apparently nobody got this particular issue. Thank you.

join s are so sweet, so that you can use them only For specific things, however, getting the same result with the nested statement is easy:

 From  to TableB in TableB, where a.Id == b. Id or an IID == select zero;   

In addition to what data you really want to find, this could be a more appropriate query:

 From  to table A where an id == faucet || Select TableB.Any (B = & gt; BIID == a.Id) one;    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -