LINQ to Entities Join on DateTime.DayOfWeek?

See if this helps you: blog.abodit.com/2009/07/entity-framework....

It appears there isn't anything I can do at this level. So what I've done is created a stored proc that joins the two tables and imported it into the Entity, created a function import that returned a Shifts entity. Not sure if thats the best approach, but it works and is clean.

Interestingly, this works fine in Linq-to-Sql: from o in Orders join c in Categories on (int) o.OrderDate.Value. DayOfWeek equals c. CategoryID where o.

OrderDate! = null select c That query is meaningless -- It's just some random joins with the proper datatypes. (I was using Northwind).

The specified type member 'DayOfWeek' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported. Shifts = from s in en.

Join j in en. RANK_S_JOB on s. JobID equals j.

Join d in en. RANK_S_DAY on (int)s.ShiftDate. DayOFWeek equals d.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions