I am trying to write my SQL Statement with Linq, but I don't quite get it. I know there are many familiar posts, but maybe you can help me with mine and help me to understand how it works.
My SQL Query:
SELECT DISTINCT(cou.Country1) AS Laender, COUNT(cou.Country1) AS Anzahl FROM SEC_User be
INNER JOIN PAR_Company com ON com.CompanyID = be.CompanyID
INNER JOIN DAT_Country cou ON cou.CountryID = com.CountryID
Group by cou.Country1
Run Code Online (Sandbox Code Playgroud)
I think my start might be right:
var query …Run Code Online (Sandbox Code Playgroud)