Beispiel #1
0
        public IActionResult Delete(int id)
        {
            _entryRepository.Delete(id);
            TempData["message"] = "Entry deleted successfully.";

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public void DeleteEntry(long id)
        {
            var entry = GetEntry(id);

            _entryRepository.Delete(entry);
            _entryRepository.Save();
        }
Beispiel #3
0
 private void LöschenButton_Click(object sender, EventArgs e)
 {
     if (SpassListe.SelectedIndex != -1)
     {
         var entryInList = _entryRepository.List().FirstOrDefault(z => z.Value == SpassListe.SelectedItem.ToString());
         _entryRepository.Delete(entryInList);
         _entryRepository.SaveChanges();
         SpassListe.Items.RemoveAt(SpassListe.SelectedIndex);
     }
     else
     {
         MessageBox.Show("Kein Element ausgewählt!");
     }
 }
Beispiel #4
0
 public void Delete(int id)
 {
     EntryRepository.Delete(id);
 }
Beispiel #5
0
 /// <summary>
 /// Id'ye göre Entry ve bağlı olduğu tabloları(Reply,Like) siler.
 /// </summary>
 /// <param name="id">EntryID</param>
 /// <returns>True/False</returns>
 public bool Delete(int id)
 {
     return(_entryRepository.Delete(id));
 }
Beispiel #6
0
        public bool Delete(int?entryId)
        {
            var entry = _entryRepo.Get(u => u.Id == entryId, _context);

            return(entry != null?_entryRepo.Delete(entry, _context) : false);
        }
Beispiel #7
0
        public async Task DeleteById(int id)
        {
            var entry = await Repository.GetByIdAsync(id);

            Repository.Delete(entry);
        }
Beispiel #8
0
 public async Task Delete(Guid entryId)
 {
     await repo.Delete(entryId);
 }