Example #1
0
        public IActionResult DeleteKlant(int id)
        {
            Klant klant = _klantenRepository.GetById(id);

            if (klant == null)
            {
                return(NotFound());
            }
            _klantenRepository.Delete(klant);
            _klantenRepository.SaveChanges();
            return(NoContent());
        }