Select data from multiple tables using LINQ


Below is the query, if you want to select data from multiple tables using LINQ

 var yourvarname = (from ft in db.firsttables
                                join st in db.secondtables on ft.UserID equals st.UserID
                                where ft.UserID.Equals(st.UserID)
                                select new { st, ft }).SingleOrDefault();

Note:
db = your database object
firsttables = your first table name
secondtable = your second table name

You can ask in comments, if there is any query.

Comments

Popular posts from this blog

GRANDING UTime Master - IDOR (CVE-2023-45393)

GRANDING UTime Master - Stored XSS (CVE-2023-45391)

Ericsson BSCS iX R18 Billing & Rating (ADMX, MX) - Stored XSS (CVE-2020-29144, CVE-2020-29145)