1
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’d like to put one Where in the middle of this to pull the values only from a specific cnpj. In this case this query returns all sponsorships that are registered in the bank, but I would like you to return from the specific Ong that is logged in, in the bank have the field ong_receptora
, that has the cnpj of the same, and I can also retrieve the cnpj of the logged Ong, but I do not know how to make such a comparison in the query.
the cnpj is inside
ApadrinhamentoListas
?– novic
In Sponsorentolists I have the ong_receptor field, which has the cnpj of Ong, and through a method I can get the cnpj of Ong logged in.
– Prostetnic Vogon Jeltz