示例#1
0
        public IActionResult DeletePicture(int id)
        {
            string picName = picturesService.GetAllPictures().Where(x => x.Id == id).FirstOrDefault().Name;

            string content = string.Format("{0} deleted {1}", GetCurrentUserName(User.GetUserId()), picName);

            logsService.AddNewLog("Delete", content);

            picturesService.DeletePicture(id);

            return(RedirectToAction("ViewPictures"));
        }