LINQ to Entities Join on DateTime.DayOfWeek
问题 Imagine two tables: Shifts, RANK_S_DAY. Shifts contains a ShiftDate column which is DateTime and RANK_S_DAY has a DayOfWeek column. I need to join (int)ShiftDate.DayOfWeek equals DayOfWeek . I understand why it won't work, but I'm not quite sure how I can change it. The Exception is: The specified type member 'DayOfWeek' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported. As I understand it, LINQ can't translate (int