In my domain I have these classes (in simplified form)
public class Document { public string Id { get; set; } public IList<MetadataValue> MetadataList { get; set; } } public class MetadataValue { public string DocumentId { get; set; } public string Metadata { get; set; } public string Value { get; set; } }
A document can contain a lot of metadata. When displaying a Document object, I have:
HasMany<MetadataValue>(x => x.MetadataList) .WithRequired() .HasForeignKey(x => x.DocumentId);
When I save a Document object, its metadata list is also saved. But when I return the Document object, its metadata list is always zero. What is wrong with this display?
source share