コード例 #1
0
        public IActionResult GetMetricsFromDiseaseHistory(int id)
        {
            var result = ContentExecute <MetricListViewModel>(() =>
            {
                var metrics         = _metricsService.GetMetricsByDiseaseHistoryId(id);
                var metricListItems = metrics.Select(x => new MetricListItemViewModel(x));
                return(new MetricListViewModel()
                {
                    Metrics = metricListItems.ToList()
                });
            });

            return(Json(result));
        }