Should be simple enough:
var shopIds = _business.TArtikelShops.Where(s => s.KArtikel == kArtikel).Select(s => s.KShop);
var addresseIds = _business.TInetAddresseShops.Where(a => shopIds.Contains(a.KShop)).Select(a => a.KAddresse);
var countries = _business.TAddresses.Where(a => addresseIds.Contains(a.KAddresse)).Select(a => a.Land).Distinct();
return await countries.ToListAsync();
Only one query will be issued, on the
ToListAsync
call.
If you want everthing on a single line of C#, you could inline the three variables into the
return
line.