Skip to content
Advertisement

SELECT and SUM in Entity Framework

I want to sum all the columns and where context between dates, basically I want to convert the below SQL query to EF:

Advertisement

Answer

You can also use tuples and even name their properties, instead of anonymous classes.

Or since you’re SQL oriented, you might want to use C# LINQ query syntax (this one uses tuple):

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement