public void ShouldPerformActionToEachRow() { var sql = new DynamicSql(connectionString); sql.EachRow("select * from Customers order by CustomerID", r => Console.WriteLine("{0} - {1}", r.CompanyName, r.ContactName)); decimal total = 0.0m; sql.EachRow("select * from [Order Details] where OrderID = 10251", r => total += r.Quantity * r.UnitPrice * (decimal)(1 - r.Discount)); Assert.AreEqual(654.06m, total); }
public void SmokeTest() { var sql = new DynamicSql(connectionString); sql.EachRow("select * from Customers order by CustomerID", r => Console.WriteLine("{0} - {1}", r.CompanyName, r.ContactName)); }