public ActionResult Create() { var stores = _storeService.GetAll().ToList(); var model = new CreateStoreModel { StoreAddress = new StoreAddressModel(), Store = new StoreModel(), Urls = stores.Select(x => x.BaseUrl), }; model.JsonModel = JsonConvert.SerializeObject(model); //Create a cookie with store id in case refresh is hit. return View(model); }
// // GET: /Admin/Knockout/ public ActionResult Index() { var model = new CreateStoreModel { StoreAddress = new StoreAddressModel(), Store = new StoreModel() }; model.JsonModel = JsonConvert.SerializeObject(model); return View(model); }