Skip to content

How can async operations be handled? #205

@JRyanJones

Description

@JRyanJones

For performance and throughput purposes, I'd like to handle RetrieveData/WithRetrieveDataMethod using async operations. Is there a way to accomplish this?

Something like:

MVCGridDefinitionTable.Add("MyGrid", new MVCGridBuilder<MyViewModel>()
    .AddColumns(...)
    .WithRetrieveDataMethodAsync(async (context) =>
    {
        IMyDataRepo dataRepo = IoC.Resolve<IMyDataRepo>();
        List<MyViewModel> data = await dataRepo.GetData(...);
        return new QueryResult<MyViewModel>() { Items = data, Total = total };
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions