From b89760af8eb61cd78306cf9bceaff5a5312551f1 Mon Sep 17 00:00:00 2001 From: Lucas Morgan Date: Thu, 10 Nov 2022 19:26:20 -0600 Subject: [PATCH] yep --- Shogi.Api/Repositories/SessionRepository.cs | 7 ++++++- Shogi.Database/Session/Stored Procedures/CreateMove.sql | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Shogi.Api/Repositories/SessionRepository.cs b/Shogi.Api/Repositories/SessionRepository.cs index b863822..b4ce151 100644 --- a/Shogi.Api/Repositories/SessionRepository.cs +++ b/Shogi.Api/Repositories/SessionRepository.cs @@ -72,7 +72,12 @@ public class SessionRepository : ISessionRepository using var connection = new SqlConnection(connectionString); await connection.ExecuteAsync( "session.CreateMove", - new { }, + new + { + To = command.To, + From = command.From, + IsPromotion = command.IsPromotion + }, commandType: CommandType.StoredProcedure); } } diff --git a/Shogi.Database/Session/Stored Procedures/CreateMove.sql b/Shogi.Database/Session/Stored Procedures/CreateMove.sql index 5f95032..37f4d82 100644 --- a/Shogi.Database/Session/Stored Procedures/CreateMove.sql +++ b/Shogi.Database/Session/Stored Procedures/CreateMove.sql @@ -5,5 +5,5 @@ @PieceName NVARCHAR(13), @SessionName [session].[SessionName] AS - SELECT @param1, @param2 -RETURN 0 + +INSERT INTO [session].[Move]