async void Delete() { var response = await dialogService.ShowConfirm( "Confirm", Languages.ConfirmationDelete + " Convention ?"); if (!response) { return; } await ConventionViewModel.GetInstance().Delete(this); }
public async Task <IActionResult> PutConvention(int id, ConventionViewModel convention) { try { var p = _mapper.Map <Convention>(convention); p.Id = id; _conventionRepository.Update(p); await _conventionRepository.SaveAsync(); } catch (DbUpdateConcurrencyException) { throw; } return(NoContent()); }
public async Task <Convention> PostConvention(ConventionViewModel convention) { try { var c = _mapper.Map <Convention>(convention); await _conventionRepository.InsertAsync(c); await _conventionRepository.SaveAsync(); return(c); } catch (Exception e) { throw e; } }
public ConventionPage() { InitializeComponent(); BindingContext = new ConventionViewModel(); // NavigationPage.SetHasNavigationBar(this, false); }