Fares Ayyad

Fares Ayyad

  • NA
  • 235
  • 74k

Perform Join on three tables using EF

Oct 18 2016 6:48 AM
Hello 
 
How could i perform join for three tables using entity framework.
 
The three tables are : Vehicle, Container,Custom_Captions
 
This is the sql statement:
 
  1. SELECT        capt_ar as VehicleState,cont_name,vehl_drivername,vehl_name,vehl_entrancedate,vehl_customsdec,cont_rampid  
  2. FROM            Container INNER JOIN  
  3.                          Vehicle ON Container.cont_vehicleid = Vehicle.vehl_VehicleID INNER JOIN  
  4.                          Custom_Captions ON Vehicle.vehl_state = Custom_Captions.Capt_Code  
  5.                          where capt_family='vehl_state'  
  6.                          and vehl_Deleted is null and cont_Deleted is null  
  7.                          and vehl_ClearanceCompany=471  
 

Answers (5)