Example #1
0
        public async Task <ActionResult> Delete(BlobContentViewModel model, string updateButton)
        {
            if (updateButton.Equals("Cancel"))
            {
                return(Redirect(CacheHelper.GetPreviousPage(_cache)));
            }

            try
            {
                await DigitalTwinsHelper.DeleteBlobAsync(model.SelectedBlobContentItem, _cache, Loggers.SilentLogger);

                return(Redirect(CacheHelper.GetPreviousPage(_cache)));
            }
            catch (Exception ex)
            {
                await FeedbackHelper.Channel.SendMessageAsync(ex.Message, MessageType.Info);

                return(View(model));
            }
        }