Пример #1
0
        public async Task <List <SortedTrafficLogs> > GetTrafficLogsForMeters(TrafficMetersList list)
        {
            List <SortedTrafficLogs> request = new List <SortedTrafficLogs>();

            foreach (int id in list.MeterIds)
            {
                var query  = Db.From <TrafficLog>().Where(x => x.MeterId == id);
                var result = await Db.LoadSelectAsync(query);

                request.Add(new SortedTrafficLogs
                {
                    MeterId = id,
                    Logs    = result
                });
            }

            return(request);
        }
Пример #2
0
        public async Task <List <SortedTrafficLogs> > GetTrafficLogsForMeters(TrafficMetersList list)
        {
            var logs = await _trafficLogRepoistory.GetTrafficLogsForMeters(list);

            return(logs);
        }