CSLA .NET

From Rockford Lhotka's Expert C# 2005 and VB 2005 Business Objects books

Welcome to CSLA .NET Sign in | Join | Help
in Search

SafeDataReader feature

Last post 04-02-2008, 1:14 PM by RockfordLhotka. 1 replies.
Sort Posts: Previous Next
  •  04-01-2008, 9:10 AM 22429

    SafeDataReader feature

        I was inspired by the SafeDataReader in CSLA so I decided to implement my own but I provided an overload for every Get function which would take a nullValue parameter incase you don't want the default null value back.

        Public Function GetInt32(ByVal name As String, nullValue As Integer) As Integer

    This is useful for something like...

        Dim baudRate As Integer = dataReader.GetInt32("BaudRate", 9600)

    Where if the BaudRate column is null we just want to use our default which is 9600.

    I think this would be a nice feature in the CSLA SafeDataReader.
  •  04-02-2008, 1:14 PM 22470 in reply to 22429

    Re: SafeDataReader feature

    Good idea, I'll add this to the wish list.
    Rocky
View as RSS news feed in XML

Please contact Magenic for your .NET consulting and CSLA .NET mentoring needs.
Please consider making a donation to help support the ongoing development of CSLA .NET.

Make donation through PayPal - it's fast, free and secure!
Why donate?
Powered by Community Server, by Telligent Systems