Пример #1
0
        // GET: RestaurantBranches/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RestaurantBranchViewModel restaurantBranch = RepositoryHandler.RestaurantBranchRepository.GetAsViewModel(id ?? 0);

            restaurantBranch.SetLocation();
            if (restaurantBranch == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Restaurants = Restaurants;
            return(View(restaurantBranch));
        }