0
bilalhaidar created
Hi I am following the Development Step by Step using ASP.NET Core and Angular 2.
Towards the end of the tutorial, there is a line of code as:
await _personRepository.EnsureLoadedAsync(person, p => p.Phones);
The method EnsureLoadedAsync() is not present anymore. I replaced it with EnsureCollectionLoadedAsync(). Is that correct?
Also, why do we need this method to be called? Is it something like Include()? Is it because the IRepository.Get() does a lazy load?
Thanks
2 Answer(s)
-
0
Hi,
Yes it is changed in this issue <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2202">https://github.com/aspnetboilerplate/as ... ssues/2202</a>. We will update documentation, thanks for informing us.
We added these methods becasue EF core does not support lazy loading yet.
Thanks.
-
0
Thanks a lot :)