"poifull" <po*******@yahoo.com> wrote in message
news:gg*******************@tornado.texas.rr.com...
Is anyone using the Microsoft Enterprise Library? If yes, do you like it
or not?
Any feedback will be appreciated.
We use the Microsoft Enterprise Library extensively at our organization. We
have found that it really does help us develop our code faster than
previously (mainly because we didn't write a library ourselves that helps
with data access, logging, configuration management, et cetera). Basically,
the Microsoft Enterprise Library has taken giant leaps since the initial
release awhile ago (SQLHelper). There is something missing from the
Enterprise Library that we miss dearly though.
Before we could write our Update methods like the following short snippet:
Public Sub Update(ByVal Row As StrongTypedDataRow)
SqlHelper.ExecuteNonQueryTypedParams( _
ConnectionString, _
"MyUpdateStoredProcName", _
Row _
)
End Sub
But now, I have to do something like the following using the new Enterprise
Library:
Public Sub Update(ByVal Row As StrongTypedDataRow)
Dim db As Database = DatabaseFactory.CreateDatabase()
Dim cmd As DBCommandWrapper = _
db.GetStoredProcedureCommandWrapper("MyUpdateStore dProcName")
cmd.AddInParameter("@CustomerId", DbTypeEnumValueHere, Row.CustomerId)
If Not Row.IsCustomerNameNull
cmd.AddInParameter("@CustomerName", DbTypes.String,
Row.CustomerName)
Else
cmd.AddInParameter("@CustomerName", DbTypes.String, DBNull.Value)
End If
If Not Row.IsCustomerAddressNull
cmd.AddInParameter("@CustomerAddress", DbTypes.String,
Row.CustomerAddress")
Else
cmd.AddInParameter("@CustomerAddress", DbTypes.String, DBNull.Value)
End If
cmd.AddInParameter("@RowVersion", DbTypes.SomethingHere, DBNull.Value)
db.ExecuteNonQuery(cmd)
End Sub
Anywho, method names may be a bit off, but you get the picture :)
The new version of the Data Access Application Blocks makes you write more
code than the old version.
Mythran
End Sub