Filter data using LinQ to Object (Expression)

I have 3 tables: Students - Standards - Teachers.
Standards (StandardId) and Teachers (StandardId) has one-many relationship. And also Standards (StandardId) - Students (StandardId)
when I join 3 tables. And I filter column Description which is in Standards table, All ok.
But I add a condition into where, It occur Error.

--- Query:

Students.Join(Standards,s=>s.StudentID,st=>st.StandardId,(s,st)=>new{s.StudentName,st.Description,st.StandardId}).Join(Teachers,a=>a.StandardId,t=>t.StandardId,(a,t)=>new{a.StudentName,a.Description,t.TeacherName}).Where(a=>a.Description.Contains("Toan") && t=>t.TeacherName.Contains("Dai"))

--- And Error:

) or end of expression expected

Invalid expression term '=>'

; expected

Invalid expression term ')'

How can I do ?
Help me, Thanks.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!