c# - How to two joins in linq -


i trying write sql query linq:

query:

select s.s_name, sub.state, sub.to, sub.evaluation, sub.task_id submit_task sub join student s on s.id=sub.student_id join task t on t.id=sub.task_id t.t_name = "bbbb"; 

linq:

var subtask = (from sub in ado.submit_task                join s in ado.student on sub.student_id equals s.id                join t in ado.task on sub.task_id equals t.id                t.t_name == listview3.selecteditems[0].text                select new { s.s_name, sub.state, sub.to,                              sub.evaluation, sub.task_id }); 

but not working. when try dubugg, nothing's happened, no error or result. see mistake ??

thankk you

var text = listview3.selecteditems[0].text;  var subtask = (from sub in ado.submit_task   join s in ado.student on sub.student_id equals s.id   join t in ado.task on sub.task_id equals t.id   t.t_name == text   select new { s.s_name, sub.state, sub.to, sub.evaluation, sub.task_id }); 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -