예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
//        private readonly SingleRelationshipDefBuilder<T, TRelatedType> _relBuilder;

        public SingleRelKeyBuilder(SingleRelationshipDefBuilder <T, TRelatedType> singleRelationshipDefBuilder)
        {
            _singleRelationshipDefBuilder = singleRelationshipDefBuilder;
            _relKeyDef = new RelKeyDef();
        }