How can [lazy-loading scalar properties from split tables] be achieved?
If it is not possible, how else can I implement lazy loading of properties?
You can't, lazy-loading only works for navigation properties.
If you change your model like this:
public class Product
{
public virtual Guid Id {get;set;}
public virtual string Name {get;set;}
public virtual ProductDetails Details {get;set;}
}
public class ProductDetails
{
public virtual Guid Product_Id {get;set;}
public virtual string Details {get;set;}
}
You can utilize lazy loading, where ProductDetails
only will be queried when you get the Product.Details
property.
[Would] this mean the persistence mechanism is dictating the design of the domain?
Entity models don't have to be domain models.