Код: Выделить всё
Fruit: Apple,
StrawberyParam: "test",
AppleParam: 1,
PeachParam: 3,
Car: Porsche
BugattiParam:3,
PorscheParam: "gas",
ToyotaParam: "go",
AnotherParam: "test1"
Я думаю написать разные где предложения и их объединение для создания строки, а затем применение к ней .ToList следующим образом:
Код: Выделить всё
StrawberryWhere = ....
AppleWhere = ....
PeachWhere = ....
PorscheWhere = ....
.....
Код: Выделить всё
MyQuery = fromClause + switch based on Fruit and Car selected
(ie. AppleWhere + PorscheWhere) + selectClause;
MyQuery.ToList();
Подробнее здесь: https://stackoverflow.com/questions/587 ... ry-options
Мобильная версия