Esempio n. 1
0
        public void Workaround_Array_Parameter_Expansion_UPDATE_SET_WHERE()
        {
            var db = new WorkaroundArrayParameterExpansion.MyDatabase();

            var entity = new WorkaroundArrayParameterExpansion.Product {
                Id    = 1,
                Image = new byte[] { 1, 2, 3 }
            };

            var query = db.Products.SQL
                        .UPDATE_SET_WHERE(entity);

            Assert.AreEqual(2, query.ParameterValues.Count);
        }
Esempio n. 2
0
        public void Workaround_Array_Parameter_Expansion_INSERT_INTO_VALUES()
        {
            var db = new WorkaroundArrayParameterExpansion.MyDatabase();

            var entity = new WorkaroundArrayParameterExpansion.Product {
                Id    = 1,
                Image = new byte[] { 1, 2, 3 }
            };

            var query = db.Products.SQL
                        .INSERT_INTO_VALUES(entity);

            Assert.AreEqual(1, query.ParameterValues.Count);
        }