It would be good if I could create test data by filling related collections using a setter. Unfortunately setters don't exist for related entity collections in the Adapter template, although they do exists for related entities . Here is some code I would like to use:
var testData = new IislogRegulationEntity
{
LogID = 1,
RegID = 1,
RegulationBase = new RegulationBaseEntity
{
RegID = 1,
ReferenceDate = DateTime.Now,
RegulationReference = "reference 1",
Archived = false,
RegulationCountryRegion = new EntityCollection<RegulationCountryRegionEntity>(new List<RegulationCountryRegionEntity>()) // this line fails as there is no setter for RegulationCountryRegion
}
}
};
Would it be worth my while changing the Adapter template to add setters to related collections? (I have no idea how to do this, but if it is feasible then I will give it a try)