public static FullTagViewModel ToMvcFullTag(this FullTagEntity fullTag) { return new FullTagViewModel() { Id = fullTag.Id, Name = fullTag.Name, Articles = fullTag.Articles.Select( x => x.ToMvcSimpleArticle()) }; }
public FullTagEntity GetFullTagEntity(TagEntity e) { var result = new FullTagEntity() { Id = e.Id, Name = e.Name, Articles = uow.ArticleTagRepository.GetAll().Where(tag => tag.TagId == e.Id).Select(x => uow.ArticleRepository.GetById(x.ArticleId)?.ToBllArticle()) }; return(result); }