public ICollectionPropertyBuilder HasMany(string property) { CollectionProperty collectionProperty = this.EntityType.CollectionProperties.Where(a => a.Property.Name == property).FirstOrDefault(); if (collectionProperty == null) { PropertyInfo propertyInfo = this.GetEntityProperty(property); collectionProperty = new CollectionProperty(propertyInfo); this.EntityType.CollectionProperties.Add(collectionProperty); } ICollectionPropertyBuilder propertyBuilder = Activator.CreateInstance(typeof(CollectionPropertyBuilder <>).MakeGenericType(collectionProperty.Property.PropertyType), collectionProperty) as ICollectionPropertyBuilder; return(propertyBuilder); }
public CollectionPropertyBuilder(CollectionProperty property) { this.Property = property; }