I want to create a list of dynamically created objects.
Then I want to add this object to a list.
So in the Above example I would like to create a list of type entity with a name of Image
List<DataConsistencyModel> dataConsistencyModels = new List<DataConsistencyModel>
{
new DataConsistencyModel{ PropertyName = "Logo",TypeOf = typeof (Entity),ValidFunction = x => x.GroupId == null},
};
foreach (DataConsistencyModel dcm in dataConsistencyModels)
{
List<TypeOf> PropertyName = Data.Where(dcm.ValidFunction).ToList();
}
Using a List of Dictionaries would be a useful workaround!