I need to convert this snippet of SQL code to Linq C #. I've been able to convert almost all of the code.
SELECT COUNT(Q.ID_QUALIFICACAO) AS CONHEC_ESPECIFICO
FROM QUALIFICACAO Q
INNER JOIN
ATENDIMENTO A ON Q.ID_QUALIFICACAO = A.ID_QUALIFICACAO AND
Q.NOTACONHECESPECIF IN (9,10) AND
A.ID_TERAPEUTA = 0 AND
A.ATENDIMENTOREALIZADO = 1
Except for the line Q.NOTCONCONCONTROLLING IN (9,10)
The column NOTCONPECIF is integer type and I can not apply the Contains function to it.
What I've been able to produce so far is down:
var numero = (from q in db.QUALIFICACAOs
join a in db.ATENDIMENTOes on q.ID_QUALIFICACAO equals a.ID_QUALIFICACAO
where (q.NOTACONHECESPECIF == 10 || q.NOTACONHECESPECIF == 9) &&
a.ID_TERAPEUTA == ID_TERAPEUTA &&
a.ATENDIMENTOREALIZADO == true
select new
{
q.NOTACONHECESPECIF
}).Count();