Example #1
0
        private static void EnrichAndCompareWithDatabasePrivate(IMetadataService metadataService, ApplicationObject metaObject)
        {
            ShowProperties(metaObject);
            metadataService.EnrichFromDatabase(metaObject);
            ShowProperties(metaObject);

            List <string> delete, insert;
            bool          result = metadataService.CompareWithDatabase(metaObject, out delete, out insert);

            Console.WriteLine("Сравнение с БД прошло " + (result ? "успешно." : "с ошибками."));
            Console.WriteLine();
            if (delete.Count > 0)
            {
                ShowList("Delete list", delete);
            }
            if (insert.Count > 0)
            {
                ShowList("Insert list", insert);
            }

            Assert.IsTrue(result);
        }