Exemplo n.º 1
0
        public override void LoadCategoryInfo(ILookupRepository lookupRepository)
        {
            var articleRepository = DependencyResolver.Current.GetService <IArticleRepository>();

            var article = articleRepository.FetchArticleInfo(this.ArticleId);

            this.CategoryInfo = new Objects.CategoryInfo(lookupRepository.FetchCategoryInfo(article.CategoryId));
        }
Exemplo n.º 2
0
        public override void LoadCategoryInfo(ILookupRepository lookupRepository)
        {
            var gRep = DependencyResolver.Current.GetService <IGalleryRepository>();

            var gallery = gRep.FetchGallery(this.GalleryId);

            this.CategoryInfo = new Objects.CategoryInfo(lookupRepository.FetchCategoryInfo(gallery.CategoryId));
        }
Exemplo n.º 3
0
        public RatingLinkModel(IRatingLink data)
        {
            _lookupRepository  = DependencyResolver.Current.GetService <ILookupRepository>();
            _articleRepository = DependencyResolver.Current.GetService <IArticleRepository>();

            this.Category    = new CategoryInfo(_lookupRepository.FetchCategoryInfo(data.CategoryId));
            this.ArticleType = new ArticleType(_articleRepository.FetchType(data.ArticleTypeId));
            this.Ratings     = data.RatingIds.Select(r => new RatingModel(r.Value)).ToList();
        }
Exemplo n.º 4
0
        public RatingLinkModel(RatingLinkModelLite lite)
        {
            _lookupRepository  = DependencyResolver.Current.GetService <ILookupRepository>();
            _articleRepository = DependencyResolver.Current.GetService <IArticleRepository>();

            this.Category    = new CategoryInfo(_lookupRepository.FetchCategoryInfo(lite.CategoryId));
            this.ArticleType = new ArticleType(_articleRepository.FetchType(lite.ArticleTypeId));
            this.Ratings     = lite.Ratings;

            this._isDeleted = lite.IsDeleted;
            this._isDirty   = lite.IsDirty;
            this._isNew     = lite.IsNew;
        }