Entity History for List of Navigation Properties inside Entity Not Working
See original GitHub issueHello, I am using entity history feature and I was trying to use it against entity that has list of navigation properties as following
[Audited]
public class Branch : FullAuditedAggregateRoot, IMustHaveTenant
{
public LocalizedText Name { get; private set; }
public string Code { get; set; }
public bool IsActive { get; private set; }
public bool IsAirport { get; private set; }
private readonly List<BranchUser> _branchUsers;
public IReadOnlyCollection<BranchUser> BranchUsers => _branchUsers;
public int TenantId { get; set; }
public AddressInformation AddressInformation { get; private set; }
public ContactInformation ContactInformation { get; private set; }
private Branch()
{
_branchUsers = new List<BranchUser>();
}
}
It works only for owned types , but it didn’t work for list 😦
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Entity Framework Navigation Properties not loading
I'm using the code first option. Below I have a basic model. The database was created properly and the records persist properly but...
Read more >Relationships, navigation properties, and foreign keys - EF6
In Entity Framework you commonly use navigation properties to load entities that are related to the returned entity by the defined association.
Read more >How do you manage non-loaded navigation properties in ...
And I want this entity to come with some navigation properties already loaded. I have a lot of such methods.
Read more >Navigation Property With Code First ...
In this article, you will learn about Navigation Property with code first and navigation property in Entity Framework.
Read more >Entity Framework Core 5 - Pitfalls To Avoid and Ideas to Try
In this post, we'll look at some pitfalls and ideas EF Core users like yourself may want to consider when developing an application....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See the commit: https://github.com/acjh/aspnetboilerplate/commit/041560d2f561e2d4254ed1b7d8f843738a69b76e
I can’t yet. And it’s irrelevant.
navigation
isnull
inOnModelCreating
. Please see my repro attempt and then create a repro that is forked from it.