public CherrySeeder(Action <ISeederConfigurationBuilder> configurationExpression) { _entityMetadataDict = new Dictionary <Type, EntityMetadata>(); _idMappingProvider = new IdMappingProvider(); var configBuilder = new SeederConfigurationBuilder(); configurationExpression(configBuilder); _configuration = configBuilder.Build(); _objectListTransformation = new ObjectListTransformation( new ObjectTransformation.ObjectTransformation( new PropertyHandler( _idMappingProvider, new TypeTransformationProvider(_configuration.TypeTransformations) ) ) ); foreach (var entitySetting in _configuration.EntitySettings) { _entityMetadataDict.Add(entitySetting.EntityType, new EntityMetadata { EntityType = entitySetting.EntityType, EntitySetting = entitySetting }); } }
private List <object> Transform(Type type, List <Dictionary <string, string> > inputObjectDictionary, ObjectListTransformation objectListTransformation, EntitySetting entitySetting) { return(objectListTransformation.Transform(type, inputObjectDictionary, entitySetting)); }