Replace custom socket implementation with SignalR.
Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework Also some UI redesign to accommodate different login experience.
This commit is contained in:
18
Shogi.Database/Session/Functions/MaxNewSessionsPerUser.sql
Normal file
18
Shogi.Database/Session/Functions/MaxNewSessionsPerUser.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE FUNCTION [session].[MaxNewSessionsPerUser]() RETURNS INT
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
DECLARE @MaxNewSessionsCreatedByAnyOneUser INT;
|
||||
|
||||
WITH CountOfNewSessionsPerPlayer AS
|
||||
(
|
||||
SELECT COUNT(*) as TotalNewSessions
|
||||
FROM [session].[Session]
|
||||
WHERE Player2Id IS NULL
|
||||
GROUP BY Player1Id
|
||||
)
|
||||
SELECT @MaxNewSessionsCreatedByAnyOneUser = MAX(CountOfNewSessionsPerPlayer.TotalNewSessions)
|
||||
FROM CountOfNewSessionsPerPlayer
|
||||
|
||||
RETURN @MaxNewSessionsCreatedByAnyOneUser
|
||||
END
|
||||
Reference in New Issue
Block a user