2
Answers

Linq Query with 2 tables

Ramco Ramco

Ramco Ramco

2y
770
1

Hi

  I have below linq query & i want to get data from another table using below query linking the two on Department,ShiftDate,Location.

From second table i want to get NoOfDays column value

Department,ShiftDate values are to be taken from variables Dept,ShiftDate

var Result = from t in context.Masters
                             where t.Active == true
                             && t.Deleted == false
                             && (t.Department == Dept)
                             select new { t.ID,t.Department,t.LocationID,t.Location,t.MachineNumber,t.MachineName };

Thanks

Answers (2)