Пример #1
0
        public void TestDataFetch()
        {
            using (var context = new InsuranceDataContext())
            {
                var repository = new InsuranceRepository(context);

                var records = repository.GetItems<t031_geo_code>();
                Assert.True(records.Any());

                var item = records.Take(1).FirstOrDefault();
                Assert.IsNotNull(item);

                var id = item.t031_id;
                var fetchedSingleItem = repository.GetItem<t031_geo_code>(id);

                Assert.IsNotNull(fetchedSingleItem);
                Assert.AreEqual(id, fetchedSingleItem.t031_id);
            }
        }