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")); }
public FoodUpdateView() { InitializeComponent(); _viewModel = new FoodUpdateViewModel(); BindingContext = _viewModel; }