I have a table called visit with the following columns:
visit_Id
member_Id
visit_Date
visit_Time
visit_DateTime
visit_Status values like (accepted, refused)
I have the following SQL query:
string sql = @"SELECT CONCAT(UPPER(SUBSTRING(visit_Status, 1, 1)), SUBSTRING(visit_Status FROM 2)) as Status, COUNT('x') AS Visits
FROM visits
WHERE visit_Date BETWEEN '2001-09-08' AND '2009-09-09'
GROUP BY visit_Status";
How can I convert this SQL into LINQ? My entity name is dbcontext. Thanks in advance for any help.
You need to use EntityFunctions