SELECT CASE WHEN EXISTS SELECT FROM AspNetUsers AS WHERE Id __user_Id_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
SELECT CASE
WHEN EXISTS (
SELECT 1
FROM [AspNetUsers] AS [a]
WHERE (([a].[Id] = @__user_Id_0) OR ([a].[Address] = N'a')) OR ([a].[FirstName] = N'z')) THEN CAST(1 AS bit)
ELSE CAST(0 AS bit)
END
SELECT CASE
WHEN EXISTS (
SELECT 1 FROM [AspNetUsers] AS [a]
WHERE (((
SELECT COUNT(*)
FROM [Orders] AS [o]
WHERE [a].[Id] = [o].[UserId]) > 0) OR ([a].[Address] = N'a')) OR ([a].[FirstName] = N'z')) THEN CAST
(1 AS bit)
ELSE CAST(0 AS bit)
END