Beispiel #1
0
        public IActionResult Remove(int id)
        {
            Talk talk = _talksRepository.GetSingle(id, User.Identity.Name);

            if (talk == null)
            {
                return(NotFound());
            }

            _talksRepository.Delete(id, User.Identity.Name);

            if (!_talksRepository.Save())
            {
                throw new Exception("Deleting a fooditem failed on save.");
            }

            return(NoContent());
        }
Beispiel #2
0
 public void Delete(Talks talkToDelete)
 {
     talksRepository.Delete(talkToDelete);
 }
 public void DeleteTalk(Talks talks)
 {
     talkRepository.Delete(talks);
 }