I'm stacking with Join LINQ in C#
I have this Query in SQL server :
SELECT cu.UserName, cu.DruckerA4,fd.Beschreibung
FROM Config_User cu
JOIN Filiale_User fu ON fu.UserID = cu.UserID
JOIN Filialdaten fd ON fd.FilialID = fu.FilialID
and i'm trying to write a LINQ code with this Query. it should do the same work .
what i have done until now is getting the elments from ConfigUser in a Method but then i am stacking how to do Join with anotehr tables .
i want to join Filialdaten and Filiale_User with Config_User
What I have tried:
public List<ConfigUser> GetUser(List<ConfigUser> elements)
{
using (IDbConnection connection = new SqlConnection (CS))
{
connection.Open();
elements = connection.Query<ConfigUser>(" select UserName,DruckerA4 from Config_User").ToList();
}
return elements;
}
the Join Method which i am stacking with :
public void JoinTable(List<ConfigUser> elements)
{
using (IDbConnection connection = new SqlConnection(CS))
{
connection.Open();
var innerJoin = from cu in elements
join
}
}