Exemple #1
0
        public ActionResult DeleteImage(int Imageid)
        {
            string message = "";

            if (GalleryService.DeleteImage(Imageid, out message))
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(RedirectToAction("DeleteImage", new { Imageid = Imageid, message = message }));
            }
        }
        public async Task <IActionResult> Delete(int id)
        {
            await service.DeleteImage(id);

            return(RedirectToAction(nameof(GalleryController.Index), Gallery));
        }