Esempio n. 1
0
        public void DeletePhoto(string path)
        {
            PhotoForGallery photo = (from u in _testStoreContext.PhotoForGalleries
                                     where u.UrlImage == path
                                     select u).FirstOrDefault();

            _testStoreContext.PhotoForGalleries.Remove(photo);
        }
Esempio n. 2
0
        public void AddPhotoForGallery(PhotoForGalleryDTO photoDto)
        {
            var photo = new PhotoForGallery()
            {
                RealEstateId = photoDto.RealEstateId,
                UrlImage     = photoDto.UrlImage,
            };

            _testStoreContext.PhotoForGalleries.Add(photo);
        }