示例#1
0
        public BlogPostBuilder WithImage(IImageFile file)
        {
            if (file == null)
            {
                return(this);
            }

            _image = async() =>
            {
                using (var stream = file.OpenStream())
                    return(await _imageService.Save(stream, file.FileName, file.ContentType));
            };

            return(this);
        }