public IActionResult Delete(long id) { var songItem = _context.SongList.FirstOrDefault(s => s.Id == id); if (songItem == null) { return(NotFound()); } _context.Remove(songItem); _context.SaveChanges(); return(new NoContentResult()); }
public void Remove(Song song) { _context.Remove(song); }