I am trying to map a complex entity type and am hitting some wall when it comes to nested relations.
Basically here's my EF entity:
public partial class LDT001002_FILE_MST
{
public LDT001002_FILE_MST()
{
this.LDT001201_FILE_STATUS_DTL = new HashSet<LDT001201_FILE_STATUS_DTL>();
... }
public virtual ICollection<LDT001201_FILE_STATUS_DTL> LDT001201_FILE_STATUS_DTL { get; set; }
This is LDT001201_FILE_STATUS_DTL:
public partial class LDT001201_FILE_STATUS_DTL
{
public System.Guid FILE_STATUS_DTL_ID { get; set; }
...
}
And here's the viewmodel used with automapper:
public class GeneralInformation
{
...
public List<FileStatuses> FileStatuses { get; set; }
...
}
public class FileStatuses : GeneralInformation {
public Guid FILE_STATUS_DTL_ID { get; set; }
[DisplayName("Date Initiated")]
}
I tried multiple CreateMap configurations but all throw unmapped errors about the object on Mapper.Map for these 2 models... any suggestions from Automapper veterans are welcome!