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