Author: Angle Bracket Percent : ASP.NET | Posted on: 10/29/2009 4:05:00 PM | Views : 1458

Recently, I started playing around with C# dynamic, and blogged how it could be used to call static class members late bound .  Today, I was talking to Phil Haack , who I think had talked to ScottGu , and he mentioned that it would be cool to use dynamic to simplify data access when you work directly with SQL query.  So I thought I?d play around with that, and it didn?t take much code to make it work nicely. So the scenario is that you?re not using any fancy O/R mapper like LINQ to SQL or Entity Framework, but you?re directly using ADO.NET to execute raw SQL commands.  It?s not something that I would personally do, but there are a lot of folks who prefer this over the higher level data access layers. So let?s look at an example...(read more) ...

Go to the complete details ...