---
title: "How to work with OR condition using lamda expression"  
description: "How to work with OR condition using lamda expression"  
author: "Sushant Mishra"  
published: 2017-07-14  
updated: 2017-07-14  
canonical: https://www.mindstick.com/forum/34321/how-to-work-with-or-condition-using-lamda-expression  
category: "linq"  
tags: ["c#", "linq", "asp.net mvc", "mvc4"]  
reading_time: 1 minute  

---

# How to work with OR condition using lamda expression

How to work with OR [condition](https://www.mindstick.com/forum/12711/select-query-with-and-condition) using lamda expression

I am using this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii)

[model](https://yourviews.mindstick.com/view/81334/america-is-reopening-after-corona-lockdown-but-on-swedish-model) = model.Where((x => x.ParentId == [true](https://yourviews.mindstick.com/view/81326/boycott-chinese-products-dream-will-come-true) )||(x => x.ParentName == true))

Its not working it [shows](https://yourviews.mindstick.com/view/81380/new-york-violent-shooting-shows-people-are-not-safe-in-night-life) [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing) that [operator](https://www.mindstick.com/blog/144/union-intersection-and-except-operator-in-sql-server) || cannot be applied to operands of type [lambda expression](https://www.mindstick.com/forum/159550/how-to-implement-an-interface-with-two-abstract-methods-by-a-lambda-expression) and lamda expression

## Replies

### Reply by Sunil Singh

Try this I hope this will helps you

```
model = model.Where((x => (x. ParentId == true) || (x. ParentName
== true))
```


---

Original Source: https://www.mindstick.com/forum/34321/how-to-work-with-or-condition-using-lamda-expression

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
