Beispiel #1
0
 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)));
 }
Beispiel #2
0
 public EntityBuilder(SchemaBuildContext context)
 {
     _context = context;
 }
 public AttributeBuilder(SchemaBuildContext context, Entity entity)
 {
     _context = context;
     Entity   = entity;
 }
Beispiel #4
0
 public RelationBuilder(SchemaBuildContext context, Attribute attribute)
 {
     _context = context;
     _attr    = attribute;
 }