Beispiel #1
0
        public IActionResult Delete(int id)
        {
            var myTrip = _dbcontext.Trips.Find(id);

            if (myTrip == null)
            {
                return(NotFound());
            }
            // DELETE FROM Trips WHERE id=?
            _dbcontext.Remove(myTrip);
            _dbcontext.SaveChanges();
            return(NoContent());
        }