public async Task <ActionResult <LugarItem> > PostLugarItem(LugarItem item) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.LugarItems.Add(item); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetLugarItem), new { id = item.Id }, item)); }
private async void OnListItemSelected(object sender, SelectedItemChangedEventArgs e) { LugarItem item = e.SelectedItem as LugarItem; if (item == null) { return; } await Navigation.PushAsync(new RestaurantesDetailPage(new RestaurantesDetailViewModel(item))); }
public async Task <IActionResult> PutLugarItem(int id, LugarItem item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
private async void OnListItemSelected(object sender, SelectedItemChangedEventArgs e) { LugarItem item = e.SelectedItem as LugarItem; if (item == null) { return; } await Navigation.PushAsync(new EntretenimientoDetailPage(new EntretenimientoDetailViewModel(item))); LugaresListView.SelectedItem = null; }
public RestaurantesDetailViewModel(LugarItem lugarItem = null) { Title = "Restaurante"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public EventosDetailViewModel(LugarItem lugarItem = null) { Title = "Evento"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public HotelesDetailViewModel(LugarItem lugarItem = null) { Title = "Hotel"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public Task <int> InsertLugarAsync(LugarItem lugar) { return(_database.InsertAsync(lugar)); }
public BaresDetailViewModel(LugarItem lugarItem = null) { Title = "Bar"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public EntretenimientoDetailViewModel(LugarItem lugarItem = null) { Title = "Entretenimiento"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public ArtesaniasDetailViewModel(LugarItem lugarItem = null) { Title = "Artesanía"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public GuiasDetailViewModel(LugarItem lugarItem = null) { Title = "Guias"; Title = lugarItem?.Nombre; Lugar = lugarItem; }
public IdiomaDetailViewModel(LugarItem lugarItem = null) { Title = "Idioma"; Title = lugarItem?.Nombre; Lugar = lugarItem; }