I am looking for a code example of this question.
Using DateTime.Add(TimeSpan) with LINQ
I need to add an entire TimeSpan to a DateTime.
I already have tried SqlFunctions.DateAdd("ss", SqlFunctions.DatePart("s", b.duration)
but this looks like it is only adding the the seconds part of the TimeSpan.
This is the code I have so far
var queryClash = from b in db.calEvents
where (newEvent.startTime <= (SqlFunctions.DateAdd("ss", SqlFunctions.DatePart("ss", b.duration), b.startTime)))
&& (newEventEndTime >= b.startTime)
select b;