private IEnumerable<IEntityMappingProvider> GetParentMappings(IEntityMappingProvider childMapping) { return from m in _originalMappings where m.EntityType != childMapping.EntityType where IsDerivedFrom(childMapping.EntityType, m.EntityType) select m; }
public IEntityMapping BuildMapping(IEntityMappingProvider mapping) { _currentType = mapping.EntityType; var classes = mapping.Classes.Select(BuildMapping); var properties = mapping.Properties.Select(BuildMapping); return new EntityMapping(mapping.EntityType, classes, properties); }
public void Visit(IEntityMappingProvider entityMappingProvider) { _currentEntityType = entityMappingProvider.EntityType; }
public void Visit(IEntityMappingProvider entityMappingProvider) { _currentEntityMapping = entityMappingProvider; PropertyMappingProviders = new List <IPropertyMappingProvider>(); ClassMappingProviders = new List <IClassMappingProvider>(); }
public void Visit(IEntityMappingProvider entityMappingProvider) { }
public InheritanceTreeProvider(IEntityMappingProvider mainProvider, IEnumerable <IEntityMappingProvider> parentProviders) { _mainProvider = mainProvider; _parentProviders = parentProviders.ToDictionary(mp => mp.EntityType, mp => mp); DiscoverProperties(); }
public ClosedGenericEntityMappingProvider(IEntityMappingProvider openGenericProvider, params Type[] typeArguments) { _closedGenericEntityType = openGenericProvider.EntityType.MakeGenericType(typeArguments); _collector = new OpenGenericEntityMappingCollector(typeArguments); openGenericProvider.Accept(_collector); }
/// <summary>Validates the specified entity mapping provider.</summary> public void Visit(IEntityMappingProvider entityMappingProvider) { _currentType = entityMappingProvider.EntityType; }
public InheritanceTreeProvider(IEntityMappingProvider mainProvider, IEnumerable<IEntityMappingProvider> parentProviders) { _mainProvider = mainProvider; _parentProviders = parentProviders.ToDictionary(mp => mp.EntityType, mp => mp); }
internal ClosedGenericEntityMappingProvider(Type closedGenericType, IEntityMappingProvider openGenericEntityMappingProvider) : base(closedGenericType, openGenericEntityMappingProvider) { }
internal EntityMappingProvider(Type entityType, IEntityMappingProvider parentEntityMappingProvider) { EntityType = entityType; _parentEntityMappingProvider = parentEntityMappingProvider; }
public void Visit(IEntityMappingProvider entityMappingProvider) { _currentEntityMapping = entityMappingProvider; PropertyMappingProviders = new List<IPropertyMappingProvider>(); ClassMappingProviders = new List<IClassMappingProvider>(); }