3
I own a Sales entity and it has several fields (Iditem, Datavenda, Valorvenda, Taxadesconto, Idcliente, Idcategorito and etc).
I already have all Views working for this entity(CRUD).
Now I will create a new View in which Customers will be presented in a grouped form with their respective totals.
Questions:
1) I need to create a specific Model to represent this View?
2) In the database I can view this information using the following query => select b.IdCliente, b.NomeCliente, Sum(ValorVenda) as ValorVenda, Count(*) as TotalItens from TabVendas a inner join TabCliente b on a.IdCliente = b.IdCliente
, how to do this same Query via Entityframework?
I think it would be interesting for the author of the question to have an answer with specific code. Could you please put some examples?
– Leonel Sanches da Silva
@I made the examples of Gypsies, is that I was producing the simplest for him to understand!
– user46523
There are more things you can add. The answers not only answer one question, but also to the entire community that uses the site. + 1.
– Leonel Sanches da Silva
Okay, @Gypsy Rhyming Mendez
– user46523