示例#1
0
        public DtoUpdateContent Handle(GetContentQuery query)
        {
            DtoUpdateContent dto = new DtoUpdateContent();
            var ent = _contentQueryRepository.Get(query.ContentId);

            dto.Body            = ent.Body;
            dto.CategoryId      = ent.CategoryId;
            dto.Description     = ent.Description;
            dto.Id              = ent.Id;
            dto.PhotoId         = ent.PhotoId;
            dto.KeywordsId      = ent.KeywordsId;
            dto.PublishDate     = ent.PublishDate;
            dto.PublishPlacesId = ent.PublishPlacesId;
            dto.Rate            = ent.Rate;
            dto.Title           = ent.Title;
            dto.WriterName      = ent.Writer.Name;
            dto.Editors         = ent.Editors;

            return(dto);
        }
示例#2
0
 public DtoContent Handle(GetContentQuery query)
 {
     return(_contentQueryRepository.Get(query.ContentId));
 }