G
Guest
Does anyone have any advice on which type to use for a business entity in the following situation..
If I want to populate a form with Employee details (windows or web) , I will get a business entity from the Employees class and use that business entity to fill all the textboxes etc.
Using VB6, I would use a recordset as the business entity like so..
My Employees class would have a method like this..
Public Function GetEmployee (EmployeeID) as ADODB.Recordse
GetEmployee = ...
End Su
And I would populate my controls like this..
Set rst = objEmployees.GetEmployee(23
txtFirstName = rst("FirstName").
But now in .NET..
there are so many choices that it seems like a waste to just start using datasets where there might be better things to choose from. The types that I have thought about using are : dataset, datarow, datareader, structure, arraylist, and my own custom object. It doesn't have to do anything fancy --- just transfer data from the business tier to the presentation tier
It seems like structures are the way to go (no garbage collection required and strongly typed), but I haven't seen this recommended so I'm a bit unsure about using them
Does anyone have any advice, recommendations, tips... whatever. Maybe just tell me what you use
Thanks,
Craig
If I want to populate a form with Employee details (windows or web) , I will get a business entity from the Employees class and use that business entity to fill all the textboxes etc.
Using VB6, I would use a recordset as the business entity like so..
My Employees class would have a method like this..
Public Function GetEmployee (EmployeeID) as ADODB.Recordse
GetEmployee = ...
End Su
And I would populate my controls like this..
Set rst = objEmployees.GetEmployee(23
txtFirstName = rst("FirstName").
But now in .NET..
there are so many choices that it seems like a waste to just start using datasets where there might be better things to choose from. The types that I have thought about using are : dataset, datarow, datareader, structure, arraylist, and my own custom object. It doesn't have to do anything fancy --- just transfer data from the business tier to the presentation tier
It seems like structures are the way to go (no garbage collection required and strongly typed), but I haven't seen this recommended so I'm a bit unsure about using them
Does anyone have any advice, recommendations, tips... whatever. Maybe just tell me what you use
Thanks,
Craig