Hi everyones,
I need to make a mapping One by One, and I have some doubts. I have this classes:
public class DocumentType {
public virtual int Id { get; set; }
/* othes properties for documenttype */
public virtual DocumentConfiguration Configuration { get; set; }
public DocumentType () { }
}
public class DocumentConfiguration {
public virtual int Id { get; set; }
/* some other properties for configuration */
public virtual DocumentType Type { get; set; }
public DocumentConfiguration () { }
}
A DocumentType object has only one DocumentConfiguration, but it is not a inherits, it's only one by one and unique, to separate properties.
How should be my mappings in this case ? Should I use References or HasOne ? Someone could give an example ?
When I load a DocumentType object I'd like to auto load the property Configuration (in documentType).
Thanks a lot guys!
Cheers