作者在 2016-11-26 11:04:38 发布以下内容
linq内部不支持AddDays之类的运算,不过没关系,把它放到外部就可以了
Dim time1 = DateTime.Now.AddDays(-30)
Dim topics = (From topic In db.Topics Where topic.CreatedAt > time1 Select topic Order By topic.ID Descending).ToPagedList(pageNumber, 10)
就这么简单