Esempio n. 1
0
        public HasMany(DynamicRepository repository, string named)
        {
            this.repository = repository;

            this.named = named ?? repository.GetType().Name;
        }
Esempio n. 2
0
        public HasManyThrough(DynamicRepository repository, DynamicRepository through, string named)
        {
            this.repository = repository;

            this.through = through;

            this.named = named ?? repository.GetType().Name;
        }
Esempio n. 3
0
        public HasManyAndBelongsTo(DynamicRepository repository, DynamicRepository reference)
        {
            Repository = repository;

            this.reference = reference;

            var sorted = new[] { repository.TableName, reference.TableName }.OrderBy(s => s);

            throughTable = sorted.First() + sorted.Last();

            Named = repository.GetType().Name;
        }