Skip to content

Commit b9b1690

Browse files
committed
Add SimulationType, add Service
1 parent adeefe8 commit b9b1690

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Api.enums;
2+
3+
namespace Bll.Domain.Services;
4+
5+
public interface ISimulationService
6+
{
7+
void StartSimulation(SimulationType simulationType);
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Api.enums;
2+
3+
public enum SimulationType
4+
{
5+
Standard = 0
6+
}

backend/ServiceSimulation/WebApplication2/Api.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
<ItemGroup>
1414
<Folder Include="Controllers\" />
15+
<Folder Include="Models\" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<ProjectReference Include="..\Bll.Domain\Bll.Domain.csproj" />
1520
</ItemGroup>
1621

1722
</Project>
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
using Microsoft.AspNetCore.Mvc;
1+
using Api.enums;
2+
using Bll.Domain.Services;
3+
using Microsoft.AspNetCore.Mvc;
24

35
namespace Api.Controllers;
46

57
[Route("simulation")]
68
public class Simulation : Controller
79
{
10+
private readonly ISimulationService _simulationService;
11+
12+
public Simulation(ISimulationService simulationService)
13+
{
14+
_simulationService = simulationService;
15+
}
16+
817
[HttpGet("/start")]
9-
public IActionResult Start()
18+
public IActionResult Start(SimulationType simulationType)
1019
{
20+
_simulationService.StartSimulation(simulationType);
1121
return Ok("Simulation answer");
1222
}
1323
}

0 commit comments

Comments
 (0)