Linq join between two tables of sql serverI am written program using LINQ join between two tables.but it giving following error.
protected void Page_Load(object sender, EventArgs e)
DataClassesDataContext dbContext = new DataClassesDataContext();
var employeesByDepartment = from e1 in dbContext.EmployeeDetails
join d in dbContext.Employees
on e1.ID equals d.ID
EmployeeName = e1.name
foreach (var department in employeesByDepartment)
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1941: The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'.