public UserDataService()
        {
            ImdbContext context = new ImdbContext();

            _users           = new UserRepository(context);
            _bookmarks       = new BookmarkRepository(context);
            _comments        = new CommentsRepository(context);
            _searchHistory   = new SearchHistoryRepository(context);
            _specialRoles    = new SpecialRolesRepository(context);
            _userRatings     = new UserRatingRepository(context);
            _flaggedComments = new FlaggedCommentsRepository(context);
        }
예제 #2
0
        public TitleDataService()
        {
            var context = new ImdbContext();

            _castInfo        = new CastInfoRepository(context);
            _titles          = new TitleRepository(context);
            _casts           = new CastsRepository(context);
            _genre           = new GenreRepository(context);
            _format          = new FormatRepository(context);
            _userRating      = new UserRatingRepository(context);
            _titleFormat     = new TitleFormatRepository(context);
            _titleGenre      = new TitleGenreRepository(context);
            _titleAlias      = new TitleAliasRepository(context);
            _titleInfo       = new TitleInfoRepository(context);
            _episodes        = new GenericRepository <Episodes>(context);
            _comments        = new CommentsRepository(context);
            _bookmarks       = new BookmarkRepository(context);
            _flaggedComments = new FlaggedCommentsRepository(context);
        }