DevExpress / DevExpress/DevExtreme.AspNet.Data
Force DataSourceLoader to load data before it is returned from a controller's action
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 165
- Forks
- 140
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 4
Description
// 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:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the shown controller action with a disposed MyDbContext and DataSourceLoader.Load(db.Table0, loadOptions), then inspect how the returned query is executed. Done means the action can dispose the context without an ObjectDisposedException while still returning the loaded data; add or update a regression test if the repository provides a suitable test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100