예제 #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());
     }
 }
예제 #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());
     }
 }
예제 #3
0
 public VisitLog AddVisitLog(VisitLog visiLog)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         cnn.Execute(visiLog.GetSqliteInsertSql(null), visiLog);
         return(visiLog);
     }
 }
예제 #4
0
 public Visitor AddVisitor(Visitor visitor)
 {
     using (var cnn = ActionDb.DbConnection())
     {
         cnn.Execute(visitor.GetSqliteInsertSql(null), visitor);
         return(visitor);
     }
 }