public IActionResult CreateWebshop()
        {
            var model = new CreateWebshopInputViewModel()
            {
                ProductCostPercentage        = 80,
                OfflineServiceCostPercentage = 2,
                OnlineServiceCostPercentage  = 1
            };

            return(View(model));
        }
        public IActionResult CreateWebshop(CreateWebshopInputViewModel model)
        {
            if (!ModelState.IsValid || !IsFeaturesSelectionValid(model.Features))
            {
                return(View(model));
            }

            if (model.Features == null)
            {
                model.Features = new List <Guid>();
            }
            model.Features        = model.Features.Concat(new[] { BusinessConstants.WebshopFeatureId.Standard });
            model.IterationNumber = Framework.Context.IterationNumber;

            var webshop = Mapper.Map <Webshop>(model);

            webshop.ProjectId = Framework.Context.ProjectId.Value;
            Framework.Webshops.Create(webshop);

            return(RedirectToAction("Index"));
        }