SELECT
ID, ACTION, BRAID, COMPID, CONFIGSTRDOCID, DESCRIPTION,
ITEMDOCSERID, QTYISFROMPACKREM, SOURCEDOCSERID, SOURCEITEMS,
SOURCESTATUSFROM, SOURCESTATUSPROC, SOURCESTATUSTO, STOREID,
USERIDS,
COUNT = (SELECT COUNT(*) FROM TRADES
WHERE DOCSERID = DEFINEDOCS.SOURCEDOCSERID
AND TRADES.STATUS = 0)
FROM
DEFINEDOCS
WHERE
(ACTION = 2)
ORDER BY
DESC
I want to write this query with an extra select inside to my repository without the use of a SqlCommand but with the use of Entity Framework