internal DynamoDbRootEntityConfiguration LoadConfiguration <TEntity>()
        {
            if (!MapConfigurations.ContainsKey(typeof(TEntity)))
            {
                var classMap = ClassMapLoader.Load <TEntity>();
                MapConfigurations.Add(typeof(TEntity), classMap.GetRootConfiguration());
            }

            return(MapConfigurations[typeof(TEntity)]);
        }
Exemplo n.º 2
0
        private FieldConfiguration CreateComplexFieldConfiguration <TType>(PropertyInfo propertyInfo)
        {
            var classMap = _classMapLoader.Load <TType>();

            var fieldConfiguration = new FieldConfiguration(propertyInfo.Name, propertyInfo.PropertyType, true);

            foreach (var innerFieldConfiguration in classMap.GetMappingConfigurationFields())
            {
                fieldConfiguration.FieldConfigurations.Add(innerFieldConfiguration);
            }

            _dynamoDbEntityConfiguration.AddFieldConfiguration(fieldConfiguration);

            return(fieldConfiguration);
        }