Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
i have a query like
C#
var query = (from StudCourse in context.tbl_StudentCourse
             join Course in context.tbl_Course on StudCourse.CourseID equals                              Course.CourseID join Stud in context.tbl_Student on StudCourse.StudentId equals   Stud.StudentID 
select new
{Stud.Name,
 Stud.Contact1,
 Stud.StudentID,
 CN = Course.Name,
 Stud.StudImg
})

in query i got the anonymous object but the Stud.Name get the value of CN ie.Course.Name. It is replacing the original value of Stud.Name.
i have tried the .ToList() but it is not working. Please tell me why i m getting this bug..
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900