I have this query:
SELECT
MAX(CASE WHEN Area = 'A' THEN Auth_Area END) A,
MAX(CASE WHEN Area = 'B' THEN Auth_Area END) B,
MAX(CASE WHEN Area = 'C' THEN Auth_Area END) C
FROM tbAutorizacion
WHERE Id = 'Valor busqueda'
AND Area IN ('A','B','C')
and I have not found how to pass it since it does not count the same structure in Entity Framework.
Object-oriented queries are done using Linq :
First you do a Linq query that filters by the specified id and then you do an individual query to get the maximum of the areas you are interested in, these maximums will be stored in the variables A , B , C .
To use Linq you must put in the usings :