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)); }
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)); }
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(); }
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; }