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

Explicit loading test #104

Merged

Conversation

caleblloyd
Copy link
Contributor

  • Here is a test to display how Explicit Loading works
  • It works out of the box with EF 1.1.0-preview1, no additional changes needed by us

// explicit load AdminMenus
await db.Entry(superUser).Collection(m => m.AdminMenus).LoadAsync();
// explicit load each Menu
foreach (var adminMenu in superUser.AdminMenus)
Copy link
Member

@yukozh yukozh Nov 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use Parallel.ForEach instead of foreach & await?
Or Task.WaitAll()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I think Task.WhenAll may be best. I will change that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@caleblloyd caleblloyd force-pushed the test_explicit_loading branch from e212560 to ea698e9 Compare November 3, 2016 01:36
@caleblloyd
Copy link
Contributor Author

I think Microsoft may be bumping from 1.1.0-preview1 to 1.1.0 soon, which is why AppVeyor is failing. I will wait until I can fix build issues to merge.

@caleblloyd caleblloyd force-pushed the test_explicit_loading branch from ea698e9 to 6fc3d2a Compare November 3, 2016 15:06
@caleblloyd caleblloyd merged commit 895213c into PomeloFoundation:master Nov 3, 2016
@caleblloyd caleblloyd deleted the test_explicit_loading branch February 7, 2017 02:59
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

Successfully merging this pull request may close these issues.

2 participants