// The Load method in JsonManagerService will return an empty list if the database file cannot be found. // LoadEmployeeListToJson should return true if the list is populated and false if it is not. private bool LoadEmployeeListFromJson() { var jsonManager = new JsonManagerService(savePath); censusProcessor.EmployeeList = jsonManager.Load(); if (censusProcessor.EmployeeList.Any()) { return(true); } return(false); }
private void SaveEmployeeListToJson() { var jsonManager = new JsonManagerService(savePath); jsonManager.Save(censusProcessor.EmployeeList); }