I need to return the sum of the business_value column, I have the following expression
dynamic contato = (from a in context.Negocio
join cli in context.Pessoa on a.id_cliente equals cli.id_pessoa
join col in context.Pessoa on a.id_colaborador equals col.id_pessoa
where cli.id_empresa == idEmpresa
&& a.data_inicio >= dataInicial
&& a.data_inicio <= dataFinal
&& a.status == "Contato"
&& (idCliente == 0 ? a.id_cliente != 0 : a.id_cliente == idCliente)
&& (idColaborador == 0 ? a.id_colaborador != 0 : a.id_colaborador == idColaborador)
select new
{
a.id_negocio,
a.id_colaborador,
a.id_cliente,
a.id_empresa,
cli = cli.razao,
col = col.razao,
a.titulo,
a.descricao,
a.valor_mensalidade,
a.valor_negocio,
a.cli_primens,
//a.data_inicio,
//a.data_fim,
a.status
}).ToList();
How to change to also bring the sum of the business_value column? example: if the database has 10 records, and each record the business_value is 10, it needs to be returned 100