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

Force DataSourceLoader to load data before it is returned from a controller's action #347

Open
ilyapavlovdx opened this issue Apr 15, 2019 · 1 comment

Comments

@ilyapavlovdx
Copy link

ilyapavlovdx commented Apr 15, 2019

// GET
using (var db = new MyDbContext())
{
    return this.Request.CreateResponse(DataSourceLoader.Load(db.Table0, loadOptions));
}

This code throws ObjectDisposedException because the MyDbContext instance is disposed of before the inner query is executed.

Related:

@AlekseyMartynov
Copy link
Contributor

Workarounds: #359 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants