public void Test1()
        {
            var context = new TestDbContext();

            var queryvalues = TestData.QueryValues;
            var options     = OptionsHelper.CreateOptions <TestMaster>(queryvalues);

            var query = context.TestMasters.ConfigureQuery(options).ToSql();

            var q2 = context.TestMasters
                     .Where(t => t.No >= 1 && t.No <= 3)
                     .Where(t => t.Name == "A" || t.Name == "B" || t.Name == "D")
                     .Where(t => t.ModityDate != DateTimeOffset.MaxValue)
                     .Where(t => t.Id != Guid.Empty)
                     .OrderByDescending(t => t.No)
                     .ThenBy(t => t.ModityDate)
                     .Skip(3)
                     .Take(3)
                     .ToSql();


            Assert.Equal(q2, query);
        }
Example #2
0
 public void SetupOptions()
 {
     Options = OptionsHelper.CreateOptions <TestMaster>(TestData.QueryValues);
 }