Example #1
0
        public async Task <ActionResult> Delete(int id, libraryNaturguiden.Picture picture)
        {
            try
            {
                var status = await PictureHandler.DeletePictureAsync(id);

                TempData["Message"] = status.ToString();
                return(RedirectToAction("Index"));
            }
            catch (Exception e)
            {
                ViewBag.Error = e.Message;
                return(View());
            }
        }