-1
任何機構可以幫助我在LinqToSql語法下面的SQL查詢轉換。它涉及我的表中的多個表。我不確定我是否使用了正確的查詢類型。任何幫助將不勝感激。
public IQueryable<tblCourseNeededHours>(int departmentId, string semester)
{
return from =
"SELECT tblCourseNeededHours.Semester, tblCourseNeededHours.NeededHoursPerWeek,
tblCourseNeededHours.AssignToInstituteAdministrator,
tblCourseNeededHours.Freezed, tblCourse.CourseName,
tblInstitute.InstituteName, tblDepartment.DepartmentName
FROM tblCourseNeededHours
INNER JOIN tblCourse ON
tblCourseNeededHours.CourseID = tblCourse.CourseID
INNER JOIN tblInstitute ON
tblCourse.InstituteID = tblInstitute.InstituteID
INNER JOIN tblDepartment ON
tblInstitute.DepartmentID = tblDepartment.DepartmentID";
}
你似乎沒有在任何地方使用參數。 – Magnus 2012-04-10 20:39:27