Hello!Here is simplest page for example:
@page "/"
@using Minstandart.Models
@using Minstandart.Data
@inject DataContext context
SfGrid DataSource="@data" AllowPaging="true" EnablePersistence="false" EnableAltRow="true"
GridPageSettings PageCount="5"
GridColumns
GridColumn Field=@nameof(Crm.Id) HeaderText="Id"
GridColumns
SfGrid
@code{
public IEnumerable data { get; set; }
protected override void OnInitialized()
{
data = context.Crms;
}
}
But in the debug output console i see that each paging request retunrs ALL data too.
Am I doing something wrong?
All is needed for paging - is count(*) but not all records.
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT `c`.`Id`, `c`.`MatrixTypeId`, `c`.`Name`
FROM `crm` AS `c`
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (0ms) [Parameters=[@__p_0='12'], CommandType='Text', CommandTimeout='30']
SELECT `c`.`Id`, `c`.`MatrixTypeId`, `c`.`Name`
FROM `crm` AS `c`
ORDER BY (SELECT 1)
LIMIT @__p_0 OFFSET @__p_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
SELECT `c`.`Id`, `c`.`MatrixTypeId`, `c`.`Name`
FROM `crm` AS `c`
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
Executed DbCommand (0ms) [Parameters=[@__p_1='12', @__p_0='24'], CommandType='Text', CommandTimeout='30']
SELECT `c`.`Id`, `c`.`MatrixTypeId`, `c`.`Name`
FROM `crm` AS `c`
ORDER BY (SELECT 1)
LIMIT @__p_1 OFFSET @__p_0