public List <LeadGeneration> GetLeadGenerationFromDatabase(IEnumerable <string> isbnList) { if (isbnList != null && isbnList.Any()) { LeadAutomatorRepoService leadAutomatorRepoService = new LeadAutomatorRepoService(_configuration); var leadGenerations = leadAutomatorRepoService.GetLeadGenerations(isbnList); return(leadGenerations.ToList()); } else { return(null); } }
// Database Retrevial Logic public List <ISBNInformation> GetISBNInformationFromDatabase(IEnumerable <string> isbnList) { //if (isbnList?.Any() ?? false) // Look into extension methods if (isbnList != null && isbnList.Any()) { LeadAutomatorRepoService leadAutomatorRepoService = new LeadAutomatorRepoService(_configuration); var iSBNInformation = leadAutomatorRepoService.ISBNInformationList(isbnList); return(iSBNInformation.ToList()); } return(null); // Change nulls to empty lists }