public ActionResult Delete(AskDeleteModel model)
        {
            if (ModelState.IsValid)
            {
                StorageAccount storageAccount = _storageAccountService.Load(model.StorageAccountId);
                if (storageAccount == null)
                {
                    ModelState.AddModelError("id", ValidationResources.StorageAccountNotFoundError);
                    return View("AskDelete");
                }

                Identity identity = User.Identity;

                if (storageAccount.UserId != identity.UserId)
                {
                    ModelState.AddModelError("forbidden", ValidationResources.NoPermissionsError);
                    return View("AskDelete");
                }

                _storageAccountService.DeleteStorageAccount(storageAccount.Id);

                TempData.AddRequestSuccessMessage(string.Format(CultureInfo.CurrentCulture, SuccessMessagesResources.StorageAccountDeletedFormat, storageAccount.AccountName));

                if (Url.IsLocalUrl(model.ReturnUrl))
                    return Redirect(model.ReturnUrl);

                return RedirectToAction("StorageAccounts", "User", new { Id = identity.UserId });

            }
            return View("AskDelete", model);
        }
        public ActionResult AskDelete(int id, string returnUrl)
        {
            Identity identity = User.Identity;

            StorageAccount storageAccount = _storageAccountService.Load(id);
            if (storageAccount == null)
            {
                ModelState.AddModelError("id", ValidationResources.StorageAccountNotFoundError);
                return View();
            }

            if (storageAccount.UserId != identity.UserId)
            {
                ModelState.AddModelError("forbidden", ValidationResources.NoPermissionsError);
                return View();
            }

            AskDeleteModel model = new AskDeleteModel
            {
                StorageAccountId = id,
                StorageAccountName = storageAccount.AccountName,
                ReturnUrl = returnUrl ?? Url.Action("StorageAccounts", "User", new { Id = identity.UserId })
            };
            return View(model);
        }