public void OverrideTableName(Type entityType, string tableName)
        {
            if (_entityMapperRegistry.ContainsKey(entityType))
            {
                // copy the mapper entry becasue it could be referenced
                // from parent context
                var duplicatedMapper = new DynamicTableEntityMapper(_entityMapperRegistry[entityType]);

                // override the table name
                duplicatedMapper.TableName = tableName;

                // re-register
                _entityMapperRegistry[entityType] = duplicatedMapper;
            }
        }
 public DynamicTableEntity(T src, DynamicTableEntityMapper entityMapper)
 {
     _srcModel     = src;
     _entityMapper = entityMapper;
     ETag          = "*";
 }
예제 #3
0
 public void AddEntityMapper(Type entityType, DynamicTableEntityMapper entityMapper)
 {
     _entityMapperRegistry.Add(entityType, entityMapper);
 }
예제 #4
0
 public DynamicTableEntityMapper(DynamicTableEntityMapper src)
 {
     this.PartitionKeyFormat = src.PartitionKeyFormat;
     this.RowKeyFormat       = src.RowKeyFormat;
     this.TableName          = src.TableName;
 }