Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't see why you can't ~technically do it. But it seems strange that you don't want to convert it.</p> <p>The "cleanness" of the EnterpriseLibarary.Data framework is very appealing.</p> <p>It also makes very "clean" code. Example:</p> <pre><code> public override IDataReader CustomersGetSingleWithOrdersReader(string customerId) { IDataReader returnReader = null; try { Database db = this.GetDatabase(); //encapsulate call to retrieve a database object, very simple routine DbCommand dbc = db.GetStoredProcCommand ("dbo.uspCustomersGetSingleWithOrders); db.AddInParameter(dbc, "@CustomerID", System.Data.DbType.String, customerId); returnReader = db.ExecuteReader(dbc); return returnReader; } finally { } } </code></pre> <p>You care about 2 things in the above code. Which stored procedure to call. What parameters to give it. The EnterpriseLibrary.Data does the rest for you.</p> <p>From my experience, the only thing the EnterpriseLibrary.Data cannot protect you from (because it can't in this situation) is using an IDataReader AND THEN NOT CLOSING IT. That's a big no-no.</p> <p>But as previously mentioned, fully qualified namespaces and such will get you around the issue.</p> <p>Don't forget that the EnterpriseLibrary.Data framework is more mature than the original DAAB.</p> <p>And don't forget one of the bugs on DAAB 2.0.</p> <p><a href="http://weblogs.asp.net/rosherove/archive/2003/07/29/10614.aspx" rel="nofollow noreferrer">http://weblogs.asp.net/rosherove/archive/2003/07/29/10614.aspx</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload