﻿CREATE PROCEDURE [dbo].[CreateBoardState]
	@boardStateDocument NVARCHAR(max),
	@sessionName NVARCHAR(100)
AS
BEGIN

SET NOCOUNT ON

INSERT INTO [session].[BoardState] (Document, SessionId)
	SELECT 
		@boardStateDocument, 
		Id
	FROM [session].[Session]
	WHERE [Name] = @sessionName;

END