I have two tables:
1) Customer Table 2) Custmer Email Table
what i want to get both email ids which have customerId=4. can I make a union and get my desire result like: **
cusromerId:4
EmailId: [email protected]
[email protected]
**
I have two tables:
1) Customer Table 2) Custmer Email Table
what i want to get both email ids which have customerId=4. can I make a union and get my desire result like: **
cusromerId:4
EmailId: [email protected]
[email protected]
**
In lambda syntax this is what you want:
var emails = firstTable
.Where(row => row.Id == 4)
.Select(row => row.Email)
.Union(secondTable
.Where(row => row.Id == 4)
.Select(row => row.Email));