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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -