Ejemplo n.º 1
0
        void AddConventionForHasOneThrough(dynamic callInfo)
        {
            var repo = RepositoryFor(Pluralize(callInfo.Name), callInfo.Instance.__ConnectionString__());

            var throughRepo = RepositoryFor(ManyToManyTableName(callInfo), callInfo.Instance.__ConnectionString__());

            var hasOneThrough = new HasOneThrough(repo, throughRepo, callInfo.Name);

            hasOneThrough.XRefFromColumn = ParentKey(callInfo);

            hasOneThrough.XRefToColumn = ChildKey(callInfo);

            InitAssociation(hasOneThrough, callInfo.Instance);
        }
Ejemplo n.º 2
0
        void AddConventionForHasOneThrough(dynamic callInfo)
        {
            var repo = RepositoryFor(Pluralize(callInfo.Name), callInfo.Instance.__ConnectionString__());

            var throughRepo = RepositoryFor(ManyToManyTableName(callInfo), callInfo.Instance.__ConnectionString__());

            var hasOneThrough = new HasOneThrough(repo, throughRepo, callInfo.Name);

            hasOneThrough.XRefFromColumn = ParentKey(callInfo);

            hasOneThrough.XRefToColumn = ChildKey(callInfo);

            InitAssociation(hasOneThrough, callInfo.Instance);
        }