Пример #1
0
        public void EditImage(ImageRequestDto imageRequestDto)
        {
            var image = GetById(imageRequestDto.Id);

            image.Id        = imageRequestDto.Id;
            image.Name      = imageRequestDto.Name;
            image.Url       = imageRequestDto.Url;
            image.Extension = imageRequestDto.Extension;
            image.postId    = imageRequestDto.postId;
        }
Пример #2
0
        public void AddImage(ImageRequestDto imageRequestDto)
        {
            var image = new Image
            {
                Name      = imageRequestDto.Name,
                Url       = imageRequestDto.Url,
                Extension = imageRequestDto.Extension,
                postId    = imageRequestDto.postId
            };

            Add(image);
        }