public async Task <IActionResult> DeletePhoto(string Id) { var photo = await _photoRepo.GetPhoto(Id); _fileManager.RemoveImage(photo.PhotoUrl); await _photoRepo.RemovePhoto(photo); await _photoRepo.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); }