public IActionResult Editar(int id) { ViewData["Accion"] = "Editar"; var restaurante = _restauranteService.Obtener(id); var viewModel = new RestauranteViewModel { Id = restaurante.Id, Nombre = restaurante.Nombre, Direccion = restaurante.Domicilio, HoraDeCierre = restaurante.HoraDeCierre.GetValueOrDefault(), PaginaWeb = restaurante.PaginaWeb, Telefono = restaurante.Telefono.ToString(), }; return(View("Agregar", viewModel)); }
public ActionResult <Restaurante> Get(int id) { return(_restauranteService.Obtener(id)); }