示例#1
0
 public void NamedParametersAreConvertedToPositionalParameters()
 {
     var c = new System.Data.Odbc.OdbcConnection(ConfigurationManager.ConnectionStrings["Odbc"].ConnectionString);
     dynamic i = c.QuerySql("SELECT p=@p, q=@q, r=@p", new { p = 5, q = 9 }).First();
     Assert.AreEqual(5, i.p);
     Assert.AreEqual(9, i.q);
     Assert.AreEqual(5, i.r);
 }
示例#2
0
        public void NamedParametersAreConvertedToPositionalParameters()
        {
            var     c = new System.Data.Odbc.OdbcConnection(ConfigurationManager.ConnectionStrings["Odbc"].ConnectionString);
            dynamic i = c.QuerySql("SELECT p=@p, q=@q, r=@p", new { p = 5, q = 9 }).First();

            Assert.AreEqual(5, i.p);
            Assert.AreEqual(9, i.q);
            Assert.AreEqual(5, i.r);
        }
示例#3
0
        public void NamedParametersAreConvertedToPositionalParameters()
        {
            var     c = new System.Data.Odbc.OdbcConnection("Driver={SQL Server};Server=.;Database=InsightDbTests; Trusted_Connection=Yes;");
            dynamic i = c.QuerySql("SELECT p=@p, q=@q, r=@p", new { p = 5, q = 9 }).First();

            Assert.AreEqual(5, i.p);
            Assert.AreEqual(9, i.q);
            Assert.AreEqual(5, i.r);
        }