Beispiel #1
0
 public List <VisitLog> LoadVisitorLogs(Pagination page)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         return(cnn.PageQuery <VisitLog>(page, "select * from VisitLog order by VisitTimeInMs desc").ToList());
     }
 }
Beispiel #2
0
 public Visitor GetVisitor(string visitorId)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         return(cnn.Query <Visitor>(typeof(Visitor).GetSelectSql("VisitorId=@VisitorId"), new { VisitorId = visitorId }).FirstOrDefault());
     }
 }
Beispiel #3
0
 public VisitLog AddVisitLog(VisitLog visiLog)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         cnn.Execute(visiLog.GetSqliteInsertSql(null), visiLog);
         return(visiLog);
     }
 }
Beispiel #4
0
 public Visitor AddVisitor(Visitor visitor)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         cnn.Execute(visitor.GetSqliteInsertSql(null), visitor);
         return(visitor);
     }
 }