Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 RavenDB 中,我想使用日期字段查询数据库。如何编写 LINQ 查询来查询涉及日期比较的 RavenDB..
Session.Query<Movie>() .Where(x => x.Status == "New" && x.ReleaseDate > DateTime.Parse("04/03/2012 00:00:00")) .Dump();
在 LINQ 垫中返回零记录。我写查询的方式不对。感谢您的帮助。
而不是 DateTime.Parse() 尝试实例化一个新的 DateTime。
Session.Query<Movie>() .Where(x => x.Status == "New" && x.ReleaseDate > new DateTime(2012, 4, 3)) .Dump();