Linq Query Using Left 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 ")                             
                     into tt_ss
                     from ss in tt_ss.DefaultIfEmpty()
                     select new
                     {
                         FirstName = tt.Field<string>("ColumnsFName"),
                         LastName = ss.Field<string>("ColumnsLName"),
                         FileName = ss == null ? "" : ss.Field<string>("FileName"),
                       }).ToList();

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#