<commit_before>using System;
using System.Linq;
using Marten.Linq.LastModified;
using Marten.Testing.Documents;
using Shouldly;
using Xunit;

namespace Marten.Testing.Acceptance
{
    public class last_modified_queries : IntegratedFixture
    {
        [Fact]
        public void query_modified_since_docs()
        {
            var user1 = new User { UserName = "foo" };
            var user2 = new User { UserName = "bar" };
            var user3 = new User { UserName = "baz" };
            var user4 = new User { UserName = "jack" };

            using (var session = theStore.OpenSession())
            {
                session.Store(user1, user2, user3, user4);
                session.SaveChanges();

                var beforeChange = DateTimeOffset.UtcNow.DateTime;
                session.Store(user3, user4);
                session.SaveChanges();

                // no where clause
                session.Query<User>().Where(x => x.ModifiedSince(beforeChange)).OrderBy(x => x.UserName).Select(x => x.UserName)
                    .ToList().ShouldHaveTheSameElementsAs("baz", "jack");

                // with a where clause
                session.Query<User>().Where(x => x.UserName != "baz" && x.ModifiedSince(beforeChange))
                    .OrderBy(x => x.UserName)
                    .ToList()
                    .Select(x => x.UserName)
                    .Single().ShouldBe("jack");
            }
        }

        [Fact]
        public void query_modified_before_docs()
        {<commit_msg>Pass DateTimeOffset not DateTime<commit_after>using System;
using System.Linq;
using Marten.Linq.LastModified;
using Marten.Testing.Documents;
using Shouldly;
using Xunit;

namespace Marten.Testing.Acceptance
{
    public class last_modified_queries : IntegratedFixture
    {
        [Fact]
        public void query_modified_since_docs()
        {
            var user1 = new User { UserName = "foo" };
            var user2 = new User { UserName = "bar" };
            var user3 = new User { UserName = "baz" };
            var user4 = new User { UserName = "jack" };

            using (var session = theStore.OpenSession())
            {
                session.Store(user1, user2, user3, user4);
                session.SaveChanges();

                var beforeChange = DateTimeOffset.UtcNow;
                session.Store(user3, user4);
                session.SaveChanges();

                // no where clause
                session.Query<User>().Where(x => x.ModifiedSince(beforeChange)).OrderBy(x => x.UserName).Select(x => x.UserName)
                    .ToList().ShouldHaveTheSameElementsAs("baz", "jack");

                // with a where clause
                session.Query<User>().Where(x => x.UserName != "baz" && x.ModifiedSince(beforeChange))
                    .OrderBy(x => x.UserName)
                    .ToList()
                    .Select(x => x.UserName)
                    .Single().ShouldBe("jack");
            }
        }

        [Fact]
        public void query_modified_before_docs()
        {
{'fraction_non_alphanumeric': 0.11427635887360839, 'fraction_numerical': 0.006548788474132285, 'mean_word_length': 1.7252453166815342, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3397733', 'n_tokens_mistral': 855, 'n_tokens_neox': 810, 'n_words': 179}