"Guy Cohen" <no*****@please.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
My problem is that my boss wants the fastest solution from me and I am not
familiar with do(n)t net *blush*
Believe me, once you have all the base classes in place, this is by far the
best method of rapid robust development.
E.g. here's a basic GridView control:
<asp:GridView ID="MyGridView" runat="server">
...bound fields etc
</asp:GridView>
Let's say I have a stored procedure called "MyStoredProcedure" which returns
the data I need to populate the GridView. With my DAL, this is how it gets
populated:
MyGridView.DataSource = DAL.GetDataSet("MyStoredProcedure");
MyGridView.DataBind();
That't it! Because the DAL is a public class and the GetDataSet method (like
all the others) are static, nothing further is required. Any page in the web
app which needs database connectivity just calls one of the methods in the
DAL. GetDataSet, as its name suggests, returns a DataSet object. Other
methods in the DAL return an SqlDataReader, others perform database writes,
others wrap stuff in transactions, others work with binary data etc.
Of course, the methods in the DAL are overloaded to accept a different
connection string from the default one (which is stored encrypted in
web.config), and also a List<SqlParametergeneric collection to support
parameterised stored procedures.
A relatively small investment in time and effort to set your base classes up
will allow you to whizz through the rest of the development cycle.
Where are you based, AAMOI...?