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
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deep SecretsPosted Feb 10, 2019, 2:07 AM
Salman BegPosted Feb 10, 2019, 12:15 AM