Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
return cn.Query<Fatura, Cobranca, Fatura>(sql, (f, c) =>
if (!faturas.TryGetValue(f.FaturaId.Value, out var fatura))
fatura = f;
fatura.Cobrancas = new Collection<Cobranca>();
faturas.Add(fatura.FaturaId.Value, fatura);
return fatura;
}, new { dataCobranca = DateTime.Now.Date }, splitOn: "CobrancaId").Distinct().ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment