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

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

Thanks

有帮助吗?

解决方案

var query = context.Table1.Sum(x => Math.Ceiling(x.PackSize/50));
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top