Skip to content

SharedDbConnectionScope Connection is null when the asynchronous call is finished #35

@kccarter76

Description

@kccarter76

Describe the bug
null exception is triggered on the SharedDbConnection scope while asynchronously streaming data from a LoadAsync. this typically is fired at the end of the iterator when it goes to close the connection.

To Reproduce
Steps to reproduce the behavior:

            await foreach (Models.Person person in people.AsAsyncEnumerable().LoadAsync())
            {
                foreach (Models.Renter renter in person.Renters)
                {
                    Context.Renters.Delete(renter);
                }

                Context.People.Delete(person);
            }

Expected behavior
I expect the connection object to not be null, so it can closed and disposed of correctly.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Version .NetStandard 2.1

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions