public string Execute(IList <string> parameters) { var sportscards = jsonReader.ImportSportscards(); if (sportscards.Count() == 0) { return($"Sorry, there are no sportscards in the file."); } foreach (var sportscard in sportscards) { string clientFirstName; string clientLastName; int? clientAge; string companyName; if (sportscard.Client != null) { clientFirstName = sportscard.Client.FirstName; clientLastName = sportscard.Client.LastName; clientAge = sportscard.Client.Age; if (sportscard.Client.Company != null) { companyName = sportscard.Client.Company.Name; } else { throw new ArgumentNullException("Sportscard's company in JSON file"); } } else { throw new ArgumentNullException("Sportscard's client in JSON file"); } this.sportscardService.AddSportscard(sportscard); } return($"Sportscards successfully imported"); }