protected override async Task <bool> TryPrepareSchemaCoreAsync() { if (_path == null) { _msg.Debug($"{nameof(_path)} is null"); return(false); } using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(_path, UriKind.Absolute)))) { if (geodatabase.GetDomains().Any(domain => string.Equals(_domainName, domain.GetName()))) { _msg.Debug($"Domain {_domainName} already exists in {_path}"); return(true); } } // the GP tool is going to fail on creating a domain with the same name await Task.WhenAll( GeoprocessingUtils.CreateDomainAsync(_path, _domainName, "Correction status for work list"), GeoprocessingUtils.AddCodedValueToDomainAsync(_path, _domainName, 100, "Not Corrected"), GeoprocessingUtils.AddCodedValueToDomainAsync(_path, _domainName, 200, "Corrected")); return(true); }