I have two Tables in my database one contains User List And Their information.
2nd contains the that submited by them
but these users are under some group
like this
user15 works under User1
user16 works under User1
var t = db.Users.Where(u => u.Under_Control == Undr).Select(u => u.UserName).ToList();
gives me the list of users
then i am trying to to retrieve data from 2nd table by using loop
eg
foreach(var item in db.userdata) {
create new list of all data...
}
i am failed then i tried this way
var test = (from usr in db.Users from data in db.userdata where user.Under_Control==Undr select data).ToList():
but it is giving me 1*5 list
Please help me to solve this i am new to Asp.net

Salman BegRank #284 · 8.8K reputationPosted Feb 9, 2019, 7:15 PM EST
Deep SecretsRank #3,889 · 382 reputationPosted Feb 9, 2019, 9:07 PM EST