Q: "SQL run using a SqlTransaction is part of a SQL Server Transaction and can be rolled back." A) TrueB) False The answer is of course "A", right? That's what I thought too. Basic SqlTransaction Usage Most of us assume that we can write this: using (var con = new SqlConnection("..")) { con.Open(); ... Continue Reading →
Blog
Updated version of Monitored Undo Framework released
Today I released an updated version of the Monitored Undo Framework. Changes include: A new parameter on the DefaultChangeFactory's methods for specifying the "description of the change". This can be helpful in cases where the UI shows a list of the undo / redo changes. A new WPF sample that shows, in a simpler codebase,... Continue Reading →
Preventing Inlining for Code that Inspects the Stack Frames
There's a first time for everything. Today, I got to use the attribute that prevents a method from being inlined. There's a good post, including a bit of a warning, on the MSDN forums regarding the issue and solution. In my case, I was looking at the call stack to get the current method, so... Continue Reading →
LinqKit and Dynamically building arbitrarily complex Linq Queries
In some cases, I need to be able to build a query that has a variable set of OR conditions. This is not simple with the default language constructs and extension methods. It’s simple to dynamically build an expression that includes AND parameters, because that is what the WHERE() extension method does. Not so easy for... Continue Reading →
Use Fiddler to view traffic when running locally…
If you haven’t used Fiddler, you should check it out. It shows you the HTTP traffic that is flowing over the wire. This can be a huge help when diagnosing issues. One small challenge is using Fiddler to view traffic that stays on the local machine. By default, fiddler cannot see data sent to http://localhost/... Continue Reading →