Example #1
0
        public PartialViewResult GetFoodBankForEdit(int id)
        {
            var repository = new FoodBanksRepository();
            var model      = repository.GetFoodBank(id);

            return(PartialView("Partials/FoodBank", model));
        }
Example #2
0
        public PartialViewResult UpdateFoodBank(FoodBank foodBank)
        {
            var repository = new FoodBanksRepository();

            repository.UpdateFoodBank(foodBank);
            var model = repository.GetFoodBank(foodBank.Id);

            return(PartialView("Partials/FoodBankTableRow", model.FoodBank));
        }