خرید بک لینک

Vote count: 0

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;

asked 3 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 22 فروردين 1395 ساعت: 3:37

صفحه بندی