private void BtnApagarVinho(object sender, EventArgs e) { Vinho v = BindingContext as Vinho; App.Database.DeleteItemAsync(v); Navigation.PopAsync(); }
internal Task <int> SaveItemAsync(Vinho item) { if (item.Id == 0) { return(bancoDados.InsertAsync(item)); } return(bancoDados.UpdateAsync(item)); }
internal Task <int> DeleteItemAsync(Vinho item) { return(bancoDados.DeleteAsync(item)); }