aspnetboilerplate: Entity History for List of Navigation Properties inside Entity Not Working

Hello, 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 😦

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I can’t yet. And it’s irrelevant. navigation is null in OnModelCreating. Please see my repro attempt and then create a repro that is forked from it.