コード例 #1
0
        public void TimeDiffNanoseconds()
        {
            TimeSpan time = stored.Add(TimeSpan.FromTicks(-1));

#if !EFOLD
            var q = this.Entities
                    .Where(x =>
                           DbFunctions.DiffNanoseconds(time, x.Time) == 100);
#else
            var q = this.Entities
                    .Where(x =>
                           EntityFunctions.DiffNanoseconds(time, x.Time) == 100);
#endif

            q.Should().NotBeEmpty();
        }
コード例 #2
0
        public void DateTimeDiffNanoseconds()
        {
            DateTime date = stored.AddTicks(-1);

#if !EFOLD
            var q = this.Entities
                    .Where(x =>
                           DbFunctions.DiffNanoseconds(date, x.DateTime) == 100);
#else
            var q = this.Entities
                    .Where(x =>
                           EntityFunctions.DiffNanoseconds(date, x.DateTime) == 100);
#endif

            q.Should().NotBeEmpty();
        }