Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Unassigned: EntityCommandExecutionExceptions when using $expand [1200]

$
0
0
I'm using OData with Entity Framework and am having some problems when using $expand.

I'm getting this error:

"There is already an open DataReader associated with this Command which must be closed first."

It's occurring when I try to access an associated entity (Bank) from within a property.

```
public string Currency
{
get
{
return Bank.Currency.Description;
}
}
```

This error only occurs when I $expand the entity when querying the "parent" entity.

Should OData support this scenario?

Comments: Also, I should add, when `Configuration.LazyLoadingEnabled = false` the application throws a `NullReferenceException` when trying to access `Bank.Currency.Description` as `Bank` is null.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>