コード例 #1
0
        public AppRepositoryFactory()
        {
            RepositoryCreationMethods.Add(typeof(IPersonRepository),
                                          dataContext => new PersonRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IRelationshipRepository),
                                          dataContext => new RelationshipRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IPersonInRelationshipRepository),
                                          dataContext => new PersonInRelationshipRepository(dataContext));
        }
コード例 #2
0
        public AppRepositoryFactory()
        {
            // add to dictionary all the repo creation methods we might need

            RepositoryCreationMethods.Add(typeof(IFeedbackRepository),
                                          dataContext => new FeedbackRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IAnimalRepository),
                                          dataContext => new AnimalRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IConservationStatusRepository),
                                          dataContext => new ConservationStatusRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IAppMapRepository),
                                          dataContext => new AppMapRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IMapSegmentRepository),
                                          dataContext => new MapSegmentRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IGeoCoordinateRepository),
                                          dataContext => new GeoCoordinateRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IMediaRepository),
                                          dataContext => new MediaRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IMediaInAnimalRepository),
                                          dataContext => new MediaInAnimalRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(ISoundTrackRepository),
                                          dataContext => new SoundTrackRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(ISoundTrackInAnimalRepository),
                                          dataContext => new SoundTrackInAnimalRepository(dataContext));

            RepositoryCreationMethods.Add(typeof(IAnimalFactRepository),
                                          dataContext => new AnimalFactRepository(dataContext));
        }
コード例 #3
0
 public AppRepositoryFactory()
 {
     RepositoryCreationMethods.Add(typeof(IBiddingRepository), dataContext
                                   => new BiddingRepository(dataContext));
 }