entity framework nested select queries
I have a SQL query and I should use it in Entity Framework. I'm new in Entity and I don't know how I can do that. My query is:
SELECT EKIP, COUNT (SAGLA) AS KPISAYISI FROM (SELECT M.APPLICATIONID AS ORTAM, MNAME AS SERVIS, sum(AVAIL*HIT)/SUM(HIT) AS SAGLA, SUM(HIT) AS CAGRI , (SELECT DOMAINNAME FROM SOAGOVERNANCE_SERVICE D WHERE D.NAME=m.MNAME AND D.APPLICATIONID=m.APPLICATIONID) AS EKIP FROM SOAGOVERNANCE_METRICLOG m WHERE MDATE BETWEEN '2013-01-01 01:00:00' AND '2013-02-01 01:00:00' AND MTYPE='SERVICE' GROUP BY APPLICATIONID, MNAME) S WHERE S.CAGRI > 3 AND S.SAGLA<90 GROUP BY EKIP ORDER BY EKIP
The simplest way is creating a sql view with you query. And then create entity on view.
Or you want full query in entity?