public async Task <ActionResult> Create(SpaceViewModel model, string createButton)
        {
            string previousPage = CacheHelper.GetPreviousPage(_cache);

            if (createButton.Equals("Cancel"))
            {
                return(Redirect(previousPage));
            }

            if (ModelState.IsValid)
            {
                try
                {
                    var spaceResult = await DigitalTwinsHelper.CreateSpaceAsync(model.SelectedSpaceItem, _cache, Loggers.SilentLogger);

                    switch (createButton)
                    {
                    case "Save & Close":
                        return(Redirect(previousPage));

                    case "Save & Create another":
                        return(RedirectToAction(nameof(Create)));

                    case "Save & Edit":
                        if (spaceResult.Id != Guid.Empty)
                        {
                            return(RedirectToAction(nameof(Edit), new { id = spaceResult.Id }));
                        }
                        else
                        {
                            return(Redirect(previousPage));
                        }

                    default:
                        return(RedirectToAction(nameof(List)));
                    }
                }
                catch (Exception ex)
                {
                    await FeedbackHelper.Channel.SendMessageAsync(ex.Message, MessageType.Info);

                    model = new SpaceViewModel(_cache);
                    return(View(model));
                }
            }
            else
            {
                return(View("Create"));
            }
        }