Suppose we have a Book which contains two accounts:
`
public class Book
{
public PassiveAccount PassiveAccount {get; set;}
public ActiveAccount AcctiveAccount {get; set;}
}
public Account
{
public decimal Balance {get; set;}
public Book Book {get; set;}
}
public ActiveAccount : Account //marker interface
{
}
public PassiveAccount : Account
{
}
`
How to properly or (if it is possible) configure this type of relationship. Can ef core understand what exactly account to load when loading the book. As I guess it must distinguish those accounts by Discriminator field.
I cann’t decide how to solve this design problem in such context;