Не могу пройтись foreach по результату возвращаемой функции:
var geoSolutionsForState = _geoSolutionsService.GetGeoSolutionsByParent(someList, "en-gb");
if (geoSolutionsForState != null)
{
foreach (var geoForState in geoSolutionsForState) //ругается на geoSolutionsForState
Сам прототип функции:
public Task<ServiceResult<IEnumerable<GeoSolution>>> GetGeoSolutionsByParent(List<int> ancestorIds, string language = "en-gb")
В консоле висит ошибка: "foreach statement cannot operate on variables of type 'ServiceResult>' because 'ServiceResult>' does not contain a public instance or extension definition for 'GetEnumerator'"