Exemplo 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);
        }
Exemplo n.º 2
0
        public void AddPhotoForGallery(PhotoForGalleryDTO photoDto)
        {
            var photo = new PhotoForGallery()
            {
                RealEstateId = photoDto.RealEstateId,
                UrlImage     = photoDto.UrlImage,
            };

            _testStoreContext.PhotoForGalleries.Add(photo);
        }