How to efficiently use classes in an ASP.NET application using C#
Posted on 2005-03-20
I'm learning ASP.NET using C#. I have learned most of the basic stuff and I can create a simple application. I want to be able to create my own classes and namespaces so that I can load data from a database into them because that's how I see it done in the ASP.NET Starter Kits, so I thought that was the best way to go when developing my application. I have no idea on how to incorporate objects with a database. For instance, if I have a table called "Projects" in the database, with fields for project name, start date, end date, contact person, etc., would I be able to store that information into an object and use it there? How would that benefit the application in terms of performance? Is there any good tutorial on this? I have tried searching for it, but I haven't found a good tutorial. I read the whole SitePoint book (Build your own ASP.NET website using C# and VB.NET) and the author didn't mention anything about creating custom objects to use the data from a database.
What I want to do (I think) is to store the data from the database in an object, use it any way I want it, and then update the data in the database. Is that how it works? Maybe I'm just really, really, really confused about the whole process. Any links, info, and suggestions will be appreciated, as I'm completely lost here.
In summary, I want to learn how to use classes in an efficient way in an ASP.NET application, how to create them (declarations), and how to organize them. I'm using Visual Studio .NET 2003.
Thanks in advance,