954,595 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Why this LINQ is not working in production ?

Hi,

I have two datatables with studentId field and I am trying to join them using LINQ. The code is working fine in development environment but in production environment it is not giving the expected result. It is not filtering the data that I am trying to filter through LINQ in production . Any idea why ?

var selected = from s in allStudents.AsEnumerable()
                               join c in allPaymentStudentId.AsEnumerable()
                               on s.Field<string>("StudentId") equals c.Field<string>("StudentId")
                               select s;
                bool existsRecord = false;
                foreach(var sel in selected)
                {
                    existsRecord = true;
                
                }
                if (existsRecord)
                {
                    DataTable result = selected.CopyToDataTable();
                    allStudents = result;
                }

            }

            Session["AllStudents"] = allStudents;
            
            radStudent.DataSource = null;
            radStudent.Rebind();


I am using Telerik radgrid control and binding the radStudent to allStudents datatable.

virang_21
Light Poster
29 posts since Jan 2009
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: