Closed InspiringCode closed 8 months ago
Yeah, should be able to do that soon. In the meantime you can insert any non nullable column. If all your columns are nullable you can do this;
var query = DbContext.TestRows
.Select(r => EF.Functions.Count<int, TResult>(r.Col1 == null ? 1 : 1, EF.Functions.Over()));
@InspiringCode, this is available starting version 8.0.18-beta
Is there any way I could write a query that results in
SELECT X, COUNT(*) OVER() TotalCount FROM y
?I tried
EF.Functions(1, EF.Functions.Over())
andEF.Functions(new { One = 1 }, EF.Functions.Over())
and a few other variants but they all throw an exception. Would it be possible to provide an overload ofCount
that takes no query parameters and just producesCOUNT(*)
in this case?