public string RelationName(RelationName type) => RelationNameResolver.Resolve(type);
public ChildrenAggregation(string name, RelationName type) : base(name) => Type = type;
public Child(RelationName name, Id parent) { Name = name; ParentId = parent; }
/// <summary> /// Helper method to easily filter on join relations /// </summary> public QueryContainer HasRelationName(Expression <Func <T, JoinField> > field, RelationName value) => this.Term(t => t.Field(field).Value(value));
public static JoinField Link(RelationName child, Id parentId) => new Child(child, parentId);
public Parent(RelationName name) => Name = name;
public ParentAggregation(string name, RelationName type) : base(name) => Type = type;
public static JoinField Root(RelationName parent) => new Parent(parent);
public ParentIdQueryDescriptor <T> Type(RelationName type) => Assign(a => a.Type = type);
public JoinAttribute(RelationName parent, RelationName child, params RelationName[] moreChildren) : base(FieldType.Join) { Self.Relations = new Relations { { parent, new Children(child, moreChildren) } }; }
public string Resolve(RelationName t) => t?.Name ?? ResolveType(t?.Type);
public Parent(RelationName name) { Name = name; }
public JoinAttribute(RelationName parent, RelationName child, params RelationName[] moreChildren) : base(FieldType.Join) =>
public ParentIdQueryDescriptor <T> Type(RelationName type) => Assign(type, (a, v) => a.Type = v);
public ChildrenAggregationDescriptor <T> Type(RelationName type) => Assign(a => a.Type = type);