I can't find a way to map a value object collection, is it possible?
public class AnEntity
{
public int Id {get;set;}
public ICollection<Guid> Values {get;set;} // <-- this
}
Thanks, E.
I can't find a way to map a value object collection, is it possible?
public class AnEntity
{
public int Id {get;set;}
public ICollection<Guid> Values {get;set;} // <-- this
}
Thanks, E.
Copyright © 2021 Jogjafile Inc.
Because it is not possible. You can map only collection of entities (classes with key). You can solve this by using special entity and exposing second property which will provide projection for you:
If you expect that collection will be small you can also use single string field instead of related collection and use
String.Split,String.Jointo provide emulation of collection.