Exemplo n.º 1
0
        public void VerifyAddAdoItem()
        {
            IDataManager manager = new AdoDataManager
                                       {
                                           ConnectionString =
                                               ConfigurationManager.ConnectionStrings["DEMODB"]
                                               .ConnectionString
                                       };

            using (manager.Context)
            {
                manager.InsertProduct(new ProductModel
                                          {
                                              ProductCode = "WAFLEE",
                                              Title = "Southern Waffle General Charger"
                                          });

                Assert.IsTrue(manager.ReadProducts(10000).Contains(new ProductModel {ProductCode = "WAFLEE"}));
            }
        }
Exemplo n.º 2
0
        public void VerifyReadAdoItems()
        {
            IDataManager manager = new AdoDataManager
                                       {
                                           ConnectionString =
                                               ConfigurationManager.ConnectionStrings["DEMODB"]
                                               .ConnectionString
                                       };

            using (manager.Context)
            {
                foreach (var item in manager.ReadProducts(0))
                {
                    Trace.WriteLine(item.ProductCode);
                }
            }
        }