public async Task <ActionResult <Footballer> > DeleteSpecificFootballer(string footballerSurname) { try { await _repository.DeleteSpecificFootballer(footballerSurname); _logger.LogInformation ($"{_context.Footballers.Where(c => c.Surname == footballerSurname).Select(c => c.Name)} {footballerSurname} has been deleted."); return(Ok()); } catch (System.Exception ext) { _logger.LogError (ext, $"{_context.Footballers.Where(c => c.Surname == footballerSurname).Select(c => c.Name)} {footballerSurname} hasn't been deleted."); // TODO return error object with proper error code. return(BadRequest()); } }