It seems impossible to me to have a natural-id in a component.
public class User
{
private IAccount account;
public User(string name, string password){
account = new Account()
{
UserName = name,
Password = password
};
}
}
public class Account : IAccount
{
public string UserName { get; set; }
public string Password { get; set; }
}
I want the natural-id to be User.Account.UserName. I tried proxying it, but
Could not find field 'account.UserName' in class 'Customer'
which tells me this is not possible. But I may be wrong...