コード例 #1
0
        private async Task <IActionResult> ObtainByPairIdAll(string leaderId, string ledId)
        {
            var historicalEntityList = await historicalsService.ObtainByPair(leaderId, ledId);

            var historicalViewModelList = historicalEntityList.Select(HistoricalMap.ToViewModel).ToList();

            return(StatusCode((int)StatusCodes.Status200OK, historicalViewModelList));
        }
コード例 #2
0
        private async Task <IList <HistoricalEntity> > ObtainHistoricalByPair(string leaderId, string ledId)
        {
            try
            {
                var historical = await historicalsService.ObtainByPair(leaderId, ledId);

                return(historical);
            }
            catch
            {
                return(new HistoricalEntity[] { });
            }
        }