Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can async operations be handled? #205

Open
JRyanJones opened this issue Oct 27, 2020 · 0 comments
Open

How can async operations be handled? #205

JRyanJones opened this issue Oct 27, 2020 · 0 comments

Comments

@JRyanJones
Copy link

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 };
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant