public DtoUpdateWriter Handle(WriterUpdateQuery query) { var writer = _writerQueryRepository.Get(query.Id); if (writer == null) { return(null); } return(new DtoUpdateWriter() { Name = writer.Name, PhotoId = writer.PhotoId, PhotoUrl = (writer.Photo == null)? null: writer.Photo.Url, }); }
public DtoWriterDetail Handle(WriterDetailQuery query) { var writer = _writerQueryRepository.Get(query.Id); if (writer == null) { return(null); } return(new DtoWriterDetail() { Id = writer.Id, Name = writer.Name, Contents = writer.Contents, PhotoUrl = (writer.Photo == null)? null:writer.Photo.Url, }); }