Question

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

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

Thanks

Était-ce utile?

La solution

var query = context.Table1.Sum(x => Math.Ceiling(x.PackSize/50));
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top