﻿CREATE PROCEDURE [dbo].[UpdateSession]
	@SessionName [session].[SessionName],
	@BoardStateJson [session].[JsonDocument]
AS
BEGIN
	SET NOCOUNT ON;

	UPDATE bs
	SET bs.Document = @BoardStateJson
	FROM [session].[BoardState] bs
		INNER JOIN [session].[Session] s on s.Id = bs.SessionId
	WHERE s.Name = @SessionName;

END
