public static IEnumerable <EntityBuilder> ScanManyToManyRelation(SchemaBuildContext context) { return(context.EntityBuilders.Values .Where(eb => eb.ClrType != null) .SelectMany(eb => AttributesFromTypeResolver.ValidAttributesFromType(eb.ClrType)) .Select(attr => attr.GetCustomAttribute(typeof(Attributes.ManyToMany)) as Attributes.ManyToMany) .Where(r => r != null) .Select(r => new EntityBuilder(context).FromManyToManyRelation(r))); }
public EntityBuilder(SchemaBuildContext context) { _context = context; }
public AttributeBuilder(SchemaBuildContext context, Entity entity) { _context = context; Entity = entity; }
public RelationBuilder(SchemaBuildContext context, Attribute attribute) { _context = context; _attr = attribute; }