Пример #1
0
 public async Task<HttpResponseMessage> GetScenario(Guid modelId, Guid id)
 {
     var scenario = await _modelRepository.GetScenario(id);
     var hasResults = await _resultsRepository.HasResultsForScenario(id);
     var result = new ScenarioViewModel(scenario, hasResults);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
Пример #2
0
        public async Task <HttpResponseMessage> GetScenario(Guid modelId, Guid id)
        {
            var scenario = await _modelRepository.GetScenario(id);

            var hasResults = await _resultsRepository.HasResultsForScenario(id);

            var result = new ScenarioViewModel(scenario, hasResults);

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }