I have the following query :
var result = (from line in db.ApadrinhamentoListas
group new { line } by new { line.datahora, line.valor_doacao }
into grp
select new
{
DataHora = grp.Key.datahora,
Valor = grp.Key.valor_doacao
}).OrderBy(o => o.DataHora);
And I would like to put a where in the middle of this to pull the values just from a specific cnpj. In case this query returns all the sponsorship that is registered in the database, but I would like it to return from the specific node that is logged, in the database I have the field ong_receptora
, which has the cnpj of the same, and I can also retrieve cnpj from the logged ong, but I do not know how to make such a comparison in query .