Beispiel #1
0
        public PictureBTO AddPicture(PictureBTO pictureBto)
        {
            PictureDTO picture = new PictureDTO();

            if (pictureBto != null)
            {
                picture = pictureRepository.Create(pictureBto.BTOToPictureDomain().PictureDomainToDTO());
                return(picture.DTOToPictureDomain().PictureToBTO());
            }
            return(null);
        }
Beispiel #2
0
        public PictureBTO UpdatePicture(PictureBTO pictureBto)
        {
            PictureDTO picture = new PictureDTO();

            if (pictureBto != null)
            {
                picture = pictureRepository.Update(pictureBto.BTOToPictureDomain().PictureDomainToDTO());
                return(picture?.DTOToPictureDomain().PictureToBTO() ?? null);
            }
            return(null);
        }