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); }
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); }