private List <ProjectMetricModel> GetProjectMetrics(ICollection <ProjectMetric> metrics, bool metricProps = false, bool dashboard = false) => metrics.Select(m => { ProjectMetricModel projectMetric = _projectMetricService.ConvertToModel(m); if (metricProps) { projectMetric.Metric = _metricService.ConvertToModel(m.Metric); if (dashboard) { projectMetric.Metric.Columns = _metricService.GetMetricColumns(m.Metric.MetricColumn); projectMetric.Metric.MetricType = _metricTypeService.ConvertToModel(m.Metric.MetricType); } } return(projectMetric); }).ToList();
private MetricTypeModel GetMetricType(MetricType metricType) => _metricTypeService.ConvertToModel(metricType);