Esempio n. 1
0
        public async Task <IActionResult> Update([FromBody] FoodUpdateViewModel model)
        {
            Food food = mapper.Map <Food>(model);

            Response response = await foodService.Update(food);

            if (response.Success)
            {
                return(Json(new { Sucesso = true }));
            }

            return(View("Index"));
        }
Esempio n. 2
0
 public FoodUpdateView()
 {
     InitializeComponent();
     _viewModel     = new FoodUpdateViewModel();
     BindingContext = _viewModel;
 }