Actually, I think I could fix it, gona do some tests, I will post my solution if it works
======================================== Hi guys
I am migrating an older DB system to LINQ, I am having problems converting multiple SQL statements, but
SELECT * FROM cities
INNER JOIN deals ON cities.cityId = deals.CityID
INNER JOIN countries ON cities.countryID = countries.CountryId
WHERE deals.endDate >= (someDate)
AND countries.CountryId = (1)
AND deals.soldout = (false)
I did some research, but I can't get it to work, here is the LINQ expression that I came up with,
var deals = from d in db.deals
join city in db.cities on d.CityID equals city.cityId
join country in db.countries on city.countryID equals country.CountryId
where d.endDate > DateTime.Today && country.CountryId == 1 && d.soldOut == false
select d;
Is there any specific way to use 2 joins in LINQ?
Greetings
Sorry, I had a formatting error,
The application is designed to select all transactions that have a city, where countryID = 1
Scott source
share