ASP.NET 2.0 / VS.NET 2005 - best practices for populating object properties from DB?

K

Ken Fine

I want to know the most efficient approaches to fill an object's properties
from a database using the tools in VS.NET and/or any magic that's a part of
ASP.NET, ADO.NET, and related tech. I suspect there are tools or wizards or
abstractions to make this process easier, and I'm hoping some of the more
expereienced hands around here can tell me what those are.

I have a reasonably strong background building classes in classic ASP. The
methods I've been using borrow from R. Quinn's article on OOP and classes:
http://www.asp101.com/articles/richard/ooasp/default.asp

Quinn's scheme involves pulling a recordset and filling properties with
recordset. He has some generic functions (LoadByID, LoadData, etc.) to
support this.

Using VS.NET 2003/2005, what is the best practice for making this happen?
How do you get your work done? My suspicion is that it may involve strongly
typed DataSets, but I'd really appreciate it if someone can walk me through
their workflow.

Thanks!

Ken Fine
University of Washington
 
I

intrader

I want to know the most efficient approaches to fill an object's properties
from a database using the tools in VS.NET and/or any magic that's a part of
ASP.NET, ADO.NET, and related tech. I suspect there are tools or wizards or
abstractions to make this process easier, and I'm hoping some of the more
expereienced hands around here can tell me what those are.

I have a reasonably strong background building classes in classic ASP. The
methods I've been using borrow from R. Quinn's article on OOP and classes:
http://www.asp101.com/articles/richard/ooasp/default.asp

Quinn's scheme involves pulling a recordset and filling properties with
recordset. He has some generic functions (LoadByID, LoadData, etc.) to
support this.

Using VS.NET 2003/2005, what is the best practice for making this happen?
How do you get your work done? My suspicion is that it may involve strongly
typed DataSets, but I'd really appreciate it if someone can walk me through
their workflow.

Thanks!

Ken Fine
University of Washington
Look up "On the Way to Mastering ASP.NET: Introducing Custom Entity
Classes"
I will go a little farther than Entities. I like OOP, do my 'Entities'
really implement the Model of the MVS triad.
 
G

Guest

Very good, thank you, thank you, intrader. Your link is super-helpful. I
spent the afternoon playing with strongly typed datasets and the
ObjectDataSource in VS.NET 2005: my reaction was, "well, this is very cool
stuff, but it isn't OO." The author of your article suggests the same.

It seems the tools still have some ways to go before I'm in OO nirvana:
you're still stuck writing a lot of code if you have to support a complex
relational structure. Well, there's always VS.NET 2008...
 

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top