c# - Multiple table linq query? -


You can help me translate this SQL query into Linq and Lambda expressions. Choose user .id = UserPassword.user_fk UserPassword at User.id = UserIdentifier.user_fk on UserIdentifier, select UserIdentifier.identifier_value = "Key" and UserPassword.password = "

  1234 " 

I wrote this already on

  on query = context.Users from u.id at u.id in context.UserIdentifiers included in ui Being joined from joining jf.DefaultIfEmpty equals in the ui.user_fk () reference to join the userpacewords on the UED is equal to in UP2. New {id = u.id, identifier = j.identifier_value, password = added2. ???} Select  

with the help of

I'm not a happy Linq user really does not like me linq due to such a request. It's a simple one, but when you make complicated requests, the leak is a nightmare. This is the worst with dynamic request. I always have problems with linq syntax and the web really does not help to write a correct document did not get.

I think that I am not the first person to ask this question, but what I found is all wrong or does not help me. It is a simple question and I can not find the right help I'm still proving to anyone that this link is not just another POC.

you where

And your joining SQL is regularly INNER JOIN s, so you do not need to join these ... g.DefaultIfEmpty in x () < / Code> -> How to include Left External

  on query = context in U. .. The user equals ui in context.UserIdentifiers on u.id. ui.user_fk is included in context.UserPasswords equals u.id up.user_fk where join ui.identifier_value == "key" & amp; & Amp; Up.password == "1234" select new {id = u.id, identifier = ui.identifier_value, password = up.password};  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -