Link to home
Start Free TrialLog in
Avatar of Vikash p
Vikash p

asked on

Need help Joining 5 Tables in LinQ

Hi,

I have 5 tables .
Table A with Person ID as Primary Key
Table B with Service ID as Primary key
Table C Service ID as FK
Table D Service ID as FK

Table E Service ID as FK

Now when user search by Service ID I need to join 5 tables to send all data . Is there any option to pass whole raw from particular table without mentioning all fields ?
Avatar of Gautham Janardhan
Gautham Janardhan

do u mean something like this
var d = from emp in Employee 
             join dep in Department on dep,Id = emp.DepartmentId
             select dep;

Open in new window



here select dep would return all column in department
What do you mean by "whole raw?"
Avatar of Vikash p

ASKER

Gautam You have joined just two tables I need code how to do this on multiple table.

Kaufmed whole raw means::  i need to return data from 5 tables . 2 tables have 20+ columns and i need all columns value . so don't want to specify each column like TableC.Column1, TableD.Column2 for those tables rather want to return like ( TableC.allcolumns, tableD.AllColums, TableA.Column1, Table2. Column2) from other 3 tables i want to return only 4/5 columns from each table.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial