public ActionResult EditStore(Guid id) { #region validate request var user = GetCurrentUser(); var isBelong2Owner = _webStoreServices.ValidateOwnerStoreByUid(user.userId, id); if (!isBelong2Owner) { return(RedirectToAction("NonAuthorized", "Error")); } #endregion var store = _webStoreServices.FindStoreByUid(user.userId, id); var token = new EditWebStorePageToken { user = user , store = store , mode = store.id < 0 ? CommonEnums.ePageMode.insert : CommonEnums.ePageMode.edit , title = store.id < 0 ? "Create New WebStore" : "Edit " + store.name }; return(View(token)); }