Null reference when compare time

    public class CheckResultLog
    {
        [AutoIncrement]
        public int Id { get; set; }
        public int WatchItemId { get; set; }
        public string Url { get; set; }
        public string DL { get; set; }
        public string XL { get; set; }
        public ResultFlag code { get; set; }
        public string msg { get; set; }
        public DateTime Time { get; set; }
    }
  using (var db = dbFactory.Open())
            {
                logs = db.Select<CheckResultLog>(x => x.Time.Date == DateTime.Now.Date);//will throw null reference
  logs = db.Select<CheckResultLog>();//this is ok
            }

q1:I want to select the logs at same day, how should I do, may be should (xx.year == now.year xx.month = now.month xx.day == now.day )?..
q2: how deal db entry row by row
3q!

next is the stack


System.NullReferenceException : 。
   在 ServiceStack.OrmLite.SqlExpression`1.GetQuotedColumnName(ModelDefinition tableDef, String memberName)
   在 ServiceStack.OrmLite.SqlExpression`1.GetMemberExpression(MemberExpression m)
   在 ServiceStack.OrmLite.SqlExpression`1.VisitMemberAccess(MemberExpression m)
   在 ServiceStack.OrmLite.SqlExpression`1.Visit(Expression exp)
   在 ServiceStack.OrmLite.SqlExpression`1.VisitBinary(BinaryExpression b)
   在 ServiceStack.OrmLite.SqlExpression`1.Visit(Expression exp)
   在 ServiceStack.OrmLite.SqlExpression`1.VisitLambda(LambdaExpression lambda)
   在 ServiceStack.OrmLite.SqlExpression`1.Visit(Expression exp)
   在 ServiceStack.OrmLite.SqlExpression`1.AppendToWhere(String condition, Expression predicate)
   在 ServiceStack.OrmLite.SqlExpression`1.Where(Expression`1 predicate)
   在 ServiceStack.OrmLite.ReadExpressionCommandExtensions.Select[T](IDbCommand dbCmd, Expression`1 predicate)
   在 ServiceStack.OrmLite.OrmLiteReadExpressionsApi.<>c__DisplayClass14_0`1.<Select>b__0(IDbCommand dbCmd)
   在 ServiceStack.OrmLite.OrmLiteExecFilter.Exec[T](IDbConnection dbConn, Func`2 filter)
   在 ServiceStack.OrmLite.OrmLiteReadExpressionsApi.Exec[T](IDbConnection dbConn, Func`2 filter)
   在 ServiceStack.OrmLite.OrmLiteReadExpressionsApi.Select[T](IDbConnection dbConn, Expression`1 predicate)

Here is the sample how to select all records for today, iterate them row by row and print in JSON form

using (var db = dbFactory.Open())
{
    if (db.CreateTableIfNotExists<CheckResultLog>())
    {
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 19, 22, 00, 00)});
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 19, 22, 15, 00)});
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 20, 10, 00, 00)});
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 20, 11, 00, 00)});
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 20, 11, 15, 00)});
        db.Insert(new CheckResultLog { Time = new DateTime(2017, 02, 21, 12, 15, 00)});
    }

    var fromDate = DateTime.Now.Date;
    var toDate = fromDate.AddDays(1);
    var q = db.Select<CheckResultLog>(x => x.Time >= fromDate && x.Time < toDate);

    foreach (var result in q)
    {
        result.PrintDump();
    }
}

thank you for your help!