Linq Query Using Joins with AsEnumerable()

var qu = (from tt in table1.AsEnumerable()
          join ss in table2.AsEnumerable() on tt.Field<int>("UniqID")
      equals ss.Field<int>(" UniqID ")                            
           select new
            {
              FirstName = tt.Field<string>("ColumnsFName"),
              LastName = ss.Field<string>("ColumnsLName"),
            }).ToList();



Note:- Using Left join we should check  null rows in the second table. If have null row it`s throw error without  check null rows in second table.

Comments

Popular posts from this blog

SQL Query :- Create Tables,Primary key,Foreign key,Merge Statment

AngularJS

Check folder and Delete All Files from Existing Folder in C#