public async Task <IActionResult> Delete(string moniker, int id) { try { var track = _repo.GetTrack(moniker, id); _repo.Delete(track); await _repo.SaveChangesAsync(); return(Ok()); } catch (Exception ex) { _logger.LogError("Failed to delete a track: {0}", ex); } return(BadRequest("Failed to delete Track")); }