LINQ - Multi Join Tables MVC C#
Hey, plz i need to help, where is the error in my codes ad what is the solution
Model :
public class LeaveInitialBalanceViewModelKendoGrid
{
[HiddenKendoGridColumn]
public string ID { get; set; }
public string EmployeeCode { get; set; }
public string EmployeeName { get; set; }
public string Department { get; set; }
public string Section { get; set; }
public string LeaveType { get; set; }
public string LeaveBalance { get; set; }
public string PreviousBalance { get; set; }
public string LastModifyDate { get; set; }
public string LastModifyUserID { get; set; }
}
Linq Query :
public IQueryable<LeaveInitialBalanceViewModel> GetEmployeeCurrentBalance()
{
IQueryable<LeaveInitialBalanceViewModelKendoGrid> lst =
(from LvBalance in _context.EmployeeLeaveBalances
join LvConf in _contextSetup.LeaveVacationsConfigs
on LvBalance.LeaveTypeId equals LvConf.Id
join LvSubType in _contextSetup.LeaveVacationsSubTypes
on LvConf.Id equals LvSubType.ParentTypeId
join Emp in _context.Employees on LvBalance.EmployeeId equals Emp.Id
join Dept in _contextSetup.Departments on Emp.DepartmentId equals Dept.Id
.Select( x => new LeaveInitialBalanceViewModelKendoGrid
{
ID = x.,
EmployeeCode =,
EmployeeName =,
Department =,
Section =,
LeaveType =,
LeaveBalance =,
PreviousBalance =,
LastModifyDate =,
LastModifyUserID =
});
return lst;
}
--- and How i can full outer join not inner join
join Sec in _contextSetup.Sections on emp.secID equals Sec.ID
please help me , my problem is : te query in linq not working i need : to solve this problem UW, tx you so much (;