Hi Friends,
I thought to share my yet another experience with Entity Framework 7 where Lazy Loading is still not implemented. I was actually designing my Movie-Review API and soon after that I realized that results are unexpected, hence without wasting time, I directly checked with Microsoft. Here, is my conversation with Microsoft.
@efmagicunicorns looks like EF7 doesn’t support lazy loading as well. Attached the scenario. Reviews always coming 0 pic.twitter.com/NKOuaMla5Z
— rahul sahay (@rahulsahay19) March 27, 2016
@rahulsahay19 Correct, it’s not implemented as yet. Here is the backlog item https://t.co/JW1k4jpPJN.
— Entity Framework (@efmagicunicorns) March 28, 2016
Therefore, below is the glimpse of the snippet, which was expected to work and workaround which I have written to give the expected results.
With this change in place, it produced me the expected result as shown below.
Here, you can see that it start giving me reviews count as well, without lazy loading it was giving 0 always.
Thanks,
Rahul Sahay
Happy Coding
Nice solution adding the OrderByDescending instead of using a more complicated method.
Garrett Fogerlie recently posted…Using Burp Suite To Attack Website Logins – Video