Replies: 3 comments 1 reply
-
Lazy loading not enabled by default for EF core. Need an IncludeDetails() call I think. See |
Beta Was this translation helpful? Give feedback.
-
Ok, that is most like it! Thanks. I'm haven't touched EF in a few years so my bad. I'll update the project and then close this discussion with a comment. I really tried to read the abb docs on EF and thereunder in "Repository Get/Find Methods" it says "GetAsync and FindAsync gets includeDetails with a default value is true." So at one point I just assumed it was included. One more thing, I never discovered the link Entity Framework Core Integration Best Practices you provided in the docs. In my opinion, the page its on Architecture->Modularity->Best Practices would probably be better placed in Architecture->Best Practices to assist in discovery. Best |
Beta Was this translation helpful? Give feedback.
-
I added EventWithDetails() method to my EventManager.cs and all the methods in the EventAppService.cs now call it. But should I be doing this in the EFCoreEventsRepository.cs instead? I'll try to find out by reading the Best practices & Conventions today. But I still find it strange that I found at least two similar issues that I'm adding here to make it easier for others to find this and hopefully save the abp team some time EF Core Eager loading and Load specific set of child entities p.s |
Beta Was this translation helpful? Give feedback.
-
Hi all. In an effort to learn the abp framework, I decided to take it apart and make an EF Core version from the EventOrganizer example.
After getting this up and running feel free to use it in your examples if you like.
The problem
Calling GetAsync() in EventAppService.cs doesn't return any Attendees even though they are in the DB (you need to log in and register for an event).
My EF setup
Here is my EventOrganizerDbContextModelCreatingExtensions.cs
my Event.cs
and my Attendee.cs
I apologize for wasting your time on something like this, but I just can't figure this one out.
Beta Was this translation helpful? Give feedback.
All reactions