Example #1
0
        public async Task <IActionResult> Create([FromBody] Scenario scenario, CancellationToken ct)
        {
            scenario.CreatedBy = User.GetId();
            var createdScenario = await _scenarioService.CreateAsync(scenario, ct);

            return(CreatedAtAction(nameof(this.Get), new { id = createdScenario.Id }, createdScenario));
        }
        public async STT.Task <IActionResult> Create([FromBody] SAVM.ScenarioForm scenarioForm, CancellationToken ct)
        {
            var createdScenario = await _ScenarioService.CreateAsync(scenarioForm, ct);

            return(CreatedAtAction(nameof(this.Get), new { id = createdScenario.Id }, createdScenario));
        }