I have the next enitities:
public class MyEntity
{
public virtual int Id { get; set; }
public virtual MySecondEntity SecondEntity { get; set; }
}
public class MySecondEntity
{
public virtual int Id { get; set; }
...
some properties here
...
}
I don't want to create MySecondEntityID property in order to have clean model.
I need to set myEntity.MySecondEntity by its Id, but I don't want to request MySecondEntity from DB.
Is it possible to do it without creating MyEntity.MySecondEntityID property and without loading the whole MySecondEntity object or even without any db requests?