Geeks With Blogs

News
The Wrecking Bawl Destructuring query language, one keyword at a time. August 2008 Entries
resharper and auto-property gotcha
Be very careful when allowing Resharper to convert properties to auto-properties. In some cases it will re-initialize fields that were already initialized earlier on in the constructor. http://www.jetbrains.net/ji... ......

Posted On Thursday, August 7, 2008 11:10 AM

generic typing and scope_identity()
I recently ran into an interesting problem. I had created a data access method that used generic typing to execute a scalar SQL Server stored procedure (below), and in the stored procedure was returning SCOPE_IDENTITY() for an integer identity column. I was passing in a type of "int" to the method (as <T>) since that's what I was expecting back, but I kept getting back null. After some frustration and bewilderment I discovered that SCOPE_IDENTITY() always returns a decimal, and C# doesn't want ......

Posted On Wednesday, August 6, 2008 5:38 AM

Copyright © Alex Bransky | Powered by: GeeksWithBlogs.net