public PropertyPart(Member property, Type parentType) { columns = new ColumnMappingCollection <PropertyPart>(this); access = new AccessStrategyBuilder <PropertyPart>(this, value => attributes.Set(x => x.Access, value)); generated = new PropertyGeneratedBuilder(this, value => attributes.Set(x => x.Generated, value)); this.property = property; this.parentType = parentType; }
protected ManyToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { this.childType = collectionType; this.fetch = new FetchTypeExpression <ManyToManyPart <TChild> >(this, (Action <string>)(value => this.collectionAttributes.Set("Fetch", 2, (object)value))); this.notFound = new NotFoundExpression <ManyToManyPart <TChild> >(this, (Action <string>)(value => this.relationshipAttributes.Set("NotFound", 2, (object)value))); this.childKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); this.parentKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); }
protected JoinedSubClassPart(string keyColumn, AttributeStore attributes, MappingProviderStore providers) : base(providers) { this.providers = providers; this.attributes = attributes; columns = new ColumnMappingCollection <JoinedSubClassPart <TSubclass> >(this) { keyColumn }; }
protected ManyToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { childType = collectionType; fetch = new FetchTypeExpression <ManyToManyPart <TChild> >(this, value => collectionAttributes.Set("Fetch", Layer.UserSupplied, value)); notFound = new NotFoundExpression <ManyToManyPart <TChild> >(this, value => relationshipAttributes.Set("NotFound", Layer.UserSupplied, value)); childKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); parentKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); }
public PropertyPart(Member member, Type parentType) { columns = new ColumnMappingCollection <PropertyPart>(this); access = new AccessStrategyBuilder <PropertyPart>(this, value => attributes.Set("Access", Layer.UserSupplied, value)); generated = new PropertyGeneratedBuilder(this, value => attributes.Set("Generated", Layer.UserSupplied, value)); this.member = member; this.parentType = parentType; SetDefaultAccess(); }
protected OneToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { this.entity = entity; childType = collectionType; keyColumns = new ColumnMappingCollection <OneToManyPart <TChild> >(this); notFound = new NotFoundExpression <OneToManyPart <TChild> >(this, value => relationshipAttributes.Set("NotFound", Layer.UserSupplied, value)); collectionAttributes.Set("Name", Layer.Defaults, member.Name); }
protected OneToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { this.entity = entity; childType = collectionType; keyColumns = new ColumnMappingCollection <OneToManyPart <TChild> >(this); cascade = new CollectionCascadeExpression <OneToManyPart <TChild> >(this, value => collectionAttributes.Set(x => x.Cascade, value)); notFound = new NotFoundExpression <OneToManyPart <TChild> >(this, value => relationshipAttributes.Set(x => x.NotFound, value)); collectionAttributes.SetDefault(x => x.Name, member.Name); }
protected ManyToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { this.entity = entity; childType = collectionType; fetch = new FetchTypeExpression <ManyToManyPart <TChild> >(this, value => collectionAttributes.Set(x => x.Fetch, value)); notFound = new NotFoundExpression <ManyToManyPart <TChild> >(this, value => relationshipAttributes.Set(x => x.NotFound, value)); childKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); parentKeyColumns = new ColumnMappingCollection <ManyToManyPart <TChild> >(this); }
protected OneToManyPart(Type entity, Member member, Type collectionType) : base(entity, member, collectionType) { this.entity = entity; childType = collectionType; keyColumns = new ColumnMappingCollection <OneToManyPart <TChild> >(this); cascade = new CollectionCascadeExpression <OneToManyPart <TChild> >(this, value => { var current = collectionAttributes.Get("Cascade") as string; collectionAttributes.Set("Cascade", Layer.UserSupplied, current == null ? value : string.Format("{0},{1}", current, value)); }); notFound = new NotFoundExpression <OneToManyPart <TChild> >(this, value => relationshipAttributes.Set("NotFound", Layer.UserSupplied, value)); collectionAttributes.Set("Name", Layer.Defaults, member.Name); }
public JoinedSubClassPart(AttributeStore underlyingStore) { attributes = new AttributeStore <JoinedSubclassMapping>(underlyingStore); columns = new ColumnMappingCollection <JoinedSubClassPart <TSubclass> >(this); }
public ElementPart(Type entity) { this.entity = entity; columns = new ColumnMappingCollection <ElementPart>(this); }