Frage

What is the way to code this query with Linq to Entities (method based syntax)?

select sum(ceiling((PackSize)/50)) from table1;

Thanks

War es hilfreich?

Lösung

var query = context.Table1.Sum(x => Math.Ceiling(x.PackSize/50));
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top