Пример #1
0
        public SentinelSource AddSentinelSource(SentinelSource source)
        {
            using (var accessor = new DemPreparationDataAccess())
            {
                var newSource = accessor.AddSource(source.Get());

                if (newSource == null)
                {
                    log.ErrorEx($"There was an error on adding Sentinel source {source.SceneId}");
                    return(null);
                }
                return(newSource.Get());
            }
        }
Пример #2
0
        public static SentinelSource GetSourceProductByName(string productName)
        {
            using (var accessor = new DemPreparationDataAccess())
            {
                var probuct = accessor.GetSoureceByName(productName);
                if (probuct == null)
                {
                    log.InfoEx($"Sentinel product {productName} was not found");
                    return(null);
                }

                return(probuct.Get());
            }
        }