Horje
join two tables in linq c#inner join Code Example
join two tables in linq c#inner join
var results = from c in db.Companies
              join cn in db.Countries on c.CountryID equals cn.ID
              join ct in db.Cities on c.CityID equals ct.ID
              join sect in db.Sectors on c.SectorID equals sect.ID
              where (c.CountryID == cn.ID) && (c.CityID == ct.ID) && (c.SectorID == company.SectorID) && (company.SectorID == sect.ID)
              select new { country = cn.Name, city = ct.Name, c.ID, c.Name, c.Address1, c.Address2, c.Address3, c.CountryID, c.CityID, c.Region, c.PostCode, c.Telephone, c.Website, c.SectorID, Status = (ContactStatus)c.StatusID, sector = sect.Name };


return results.ToList();




Csharp

Related
how to make a circuit board Code Example how to make a circuit board Code Example
salary, overtime, deductions, gross pay and netpay in console C# Code Example salary, overtime, deductions, gross pay and netpay in console C# Code Example
c# collection of generic classes Code Example c# collection of generic classes Code Example
C# temporary files Code Example C# temporary files Code Example
c# switch when Code Example c# switch when Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8