Code analyzed by Claude. Output is a sequence diagram for Mermaid.js.
sequenceDiagram
participant Client
participant GamesController
participant GamesService
participant GamesContext
participant SQL as SQL Server (Game_Modes)
Client->>GamesController: POST /api/games/NewGameMode — { title, shortTitle, gameType }
GamesController->>GamesService: CreateGameMode(CreateGameModeDTO)
GamesService->>GamesService: new GameModes { Title, ShortTitle, GameType }
GamesService->>GamesContext: GameModes.Add(newGameMode)
GamesService->>GamesContext: SaveChangesAsync()
GamesContext->>SQL: INSERT INTO Game_Modes (Title, Short_Title, Game_Type) VALUES (...)
SQL-->>GamesContext: auto-generated ID
GamesContext-->>GamesService: entity with new ID populated
GamesService->>GamesService: GetGameModeDTO.ToResponse(entity)
GamesService-->>GamesController: GetGameModeDTO
GamesController-->>Client: 200 OK — { id, title, shortTitle }
Surround the code block with three backticks (`) or three colons (:), followed by the text "mermaid".
:::mermaid
sequenceDiagram
participant Client
participant GamesController
participant GamesService
participant GamesContext
participant SQL as SQL Server (Game_Modes)
Client->>GamesController: POST /api/games/NewGameMode — { title, shortTitle, gameType }
GamesController->>GamesService: CreateGameMode(CreateGameModeDTO)
GamesService->>GamesService: new GameModes { Title, ShortTitle, GameType }
GamesService->>GamesContext: GameModes.Add(newGameMode)
GamesService->>GamesContext: SaveChangesAsync()
GamesContext->>SQL: INSERT INTO Game_Modes (Title, Short_Title, Game_Type) VALUES (...)
SQL-->>GamesContext: auto-generated ID
GamesContext-->>GamesService: entity with new ID populated
GamesService->>GamesService: GetGameModeDTO.ToResponse(entity)
GamesService-->>GamesController: GetGameModeDTO
GamesController-->>Client: 200 OK — { id, title, shortTitle }
:::