我需要这样做:
context.Ads.Where(c => c.PublishedDate.HasValue &&
c.EndDate.HasValue &&
c.EndDate.Value.AddTicks(c.PublishedDate.Value.Ticks) > currentTime &&
c.AdStatusMail.Where(b => b.StatusKey != (int)AdStatusMailKey.EndedRemainder && b.StatusKey != (int)AdStatusMailKey.MiddleRemainder).Count() < 1)
.ToList();
问题是 AddTicks 不能在 Linq 中使用。我看过 EntityFunctions 但看不到如何使用它来做我需要的事情?