public EntityDependenciesContainer AddOneToManyLink <TSource, TDestination>(Expression <Func <TSource, int?> > fkId,
                                                                                    Expression <Func <TSource, TDestination> > navProperty,
                                                                                    Expression <Func <TDestination, ICollection <TSource> > > reverse = null) where TSource : class, IWithId where TDestination : class, IWithId
        {
            var oneToManyLink = new OneToManyLink <TSource, TDestination>(fkId, navProperty, reverse);
            var reverseLink   = oneToManyLink.ReverseLink;

            _links.Add(oneToManyLink);
            if (reverseLink != null)
            {
                _links.Add(reverseLink);
            }
            return(this);
        }
Ejemplo n.º 2
0
 public ReverseLinkAdaptor(OneToManyLink <TSource, TDestination> oneToManyLink)
 {
     _oneToManyLink = oneToManyLink;
 }