P Narasimha

P Narasimha

  • 702
  • 1.3k
  • 248.2k

Need to convert linq query to sql query

Mar 13 2014 6:27 AM
Hi All,
Please help me on this linq query to sql query
here is foreign key relation is there for these 3 tables please help me write in sql
var versionPackageMapping = from verMap in this.MobileUpdateContext.VersionPackageMappings.Include(Constants.PACKAGE)
join pkg in this.MobileUpdateContext.Packages on verMap.PackageId equals pkg.ID
where verMap.PackageStatu.Status == packageStatus &&
verMap.PackageType.Type == packageType &&
verMap.Version.ManufacturerCode == manufacturerCode &&
verMap.Version.HardwareVersion == hardwareVersion &&
verMap.Version.CarrierCode == carrierCode &&
verMap.Version.SoftwareVersion == softwareVersion &&
verMap.IsActive == isActive
select verMap;
Thanks in advance
Narasimh

Answers (1)