How can I initialize the variable query before try --catch statement. Please help
public Comedian[] GetComedians() { try { _logger.LogInformation($"Getting all comedians"); var query = _db.Comedians .OrderBy(c => c.LastName); //return query.ToArray(); } catch(Exception ex) { } return query.ToArray(); // How can I return the variable query here }