Esempio n. 1
0
        public int AggregateQuery(DateTime start, DateTime end, string logType = null, string deviceType = null)
        {
            var DB     = new AppLogMapper();
            int result = DB.AggregateQuery(householdId, start, end, logType, deviceType);

            return(result);
        }
Esempio n. 2
0
        public List <string> ListLogTypes(DateTime start, DateTime end, string deviceType = null)
        {
            var           DB     = new AppLogMapper();
            List <string> result = (List <string>)DB.ListLogTypes(householdId, start, end, deviceType);

            return(result);
        }
Esempio n. 3
0
        public IAppLogIterator SelectQuery(DateTime start, DateTime end, string logType = null, string deviceType = null)
        {
            var           DB     = new AppLogMapper();
            List <AppLog> result = DB.SelectQuery(householdId, start, end, logType, deviceType).ToList();

            return(new AppLogIterator(result));
        }
        public void PushLogs()  //To be called when buffer hits max and upon logout.
        {
            Console.WriteLine("Logs pushed to db");
            var DL = new AppLogMapper().InsertMany(Buffer).Save();

            DL.Commit();
            Buffer.Clear(); //Clear buffer
        }