Skip to main content

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

SQL Query 1)    Using CASE Statement : - To Check the Particular column ISNULL              CASE WHEN ISNULL ([Col_Name], ' ') = ' ' THEN 'Others'                       ELSE [Col_Name] END AS [Col_Name] 2)    Convert Data format into VARCHAR and save 10/18/2012 this Format and also check if Date Column is Empty or not.                 CONVERT (VARCHAR,[Col_CreatedDt], 101) AS CreatedDt                        , CASE WHEN ISNULL ([Col_ModifiedDt], ' ') = ' ' THEN ' not available'                        ELSE CONVERT (VARCHAR, [ Col_ModifiedDt], 101) END AS ModifiedDt 3)    Casting  and Check Date Difference               CAST (Col_Name or ParameterName AS VARCHAR)               DATEDIFF(HOUR,Col_Date, GETDATE())<=24 4)    Create two table and set Primary key and Foreign Key             Create Table Exams            (                 exam_id int primary key,                 exam_name varchar(50),            );    

AngularJS

What is AngularJS? AngularJS is an open source web application framework. It was originally developed in 2009 by Misko Hevery and Adam Abrons. It is now maintained by Google. Its latest version is 1.4.3. Definition of AngularJS as put by its  official documentation  is as follows − AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you currently have to write. And it all happens within the browser, making it an ideal partner with any server technology. Features AngularJS is a powerful JavaScript based development framework to create RICH Internet Application(RIA). AngularJS provides developers options to write client side application (using JavaScript) in a clean MVC(Model View Controller) way. Application written in AngularJS is c

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

Dynamically check the Particular name Folder exist or not, it not exits create folder dynamically. if (!Directory.Exists(FolderName))         {             Directory.CreateDirectory(FolderName);         }         if (Directory.Exists(FolderName))         {             string[] filePaths = Directory.GetFiles(FolderName);             foreach (string filePath in filePaths)                 File.Delete(filePath);             //Directory.Delete(FolderName);                    }