I am trying to convert a complex sql statement into a linq lambda expression.
Here is an example of my sql - statement:
select * from Kunden
where a=1
and b=1
and c=1
and (
(
(d=1 or d in (2, 3, 4, 5)) <---
and e in (1, 2, 3)
)
or
(
(f=1 or f in (2, 3, 4, 5)) <---
and g in (1, 2, 3)
)
)
)
and h=1
and i=1
at least I am freaking out about the brackets in the combined or statement. Need some help to convert this statement into linq expression. I cant fire the native sql on the server, because we have a complex linq expression (about 3000 lines of code :-X) we can´t convert it to sql.
In conclusion: I NEED THE LINQ EXPRESSION.