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
Post a Comment