public SingleRelKeyDefBuilder <T, TRelatedType> WithSingleRelationship <TRelatedType>(Expression <Func <T, TRelatedType> > relationshipExpression) where TRelatedType : BusinessObject { SingleRelationshipDefBuilder <T, TRelatedType> singleRelationshipDefBuilder = new SingleRelationshipDefBuilder <T, TRelatedType>(this, relationshipExpression); _singleRelationshipDefBuilders.Add(singleRelationshipDefBuilder); var relKeyDefBuilder = new SingleRelKeyDefBuilder <T, TRelatedType>(singleRelationshipDefBuilder); singleRelationshipDefBuilder.SingleRelKeyDefBuilder = relKeyDefBuilder; return(relKeyDefBuilder); }
public SingleRelKeyDefBuilder <T, TRelatedType> WithSingleRelationship <TRelatedType>(string relationshipName) where TRelatedType : BusinessObject { SingleRelationshipDefBuilder <T, TRelatedType> singleRelationshipDefBuilder = new SingleRelationshipDefBuilder <T, TRelatedType>(this, relationshipName); _singleRelationshipDefBuilders.Add(singleRelationshipDefBuilder); var relKeyDefBuilder = new SingleRelKeyDefBuilder <T, TRelatedType>(singleRelationshipDefBuilder); singleRelationshipDefBuilder.SingleRelKeyDefBuilder = relKeyDefBuilder; return(relKeyDefBuilder); }
// private readonly SingleRelationshipDefBuilder<T, TRelatedType> _relBuilder; public SingleRelKeyBuilder(SingleRelationshipDefBuilder <T, TRelatedType> singleRelationshipDefBuilder) { _singleRelationshipDefBuilder = singleRelationshipDefBuilder; _relKeyDef = new RelKeyDef(); }