JRockFL
asked on
Class and database
Here is a snip of the Task class.
I need to work with a DeveloperID and also the Developer's Name
When displaying to UI, I need to show the developer's, but when working with the database I need the developerid
Currently, the task class with get filled with data from the database and my
sql query only has the developerid.
Should I modify the query to include the the developer's name? (I would need to create a join and then pull from the
developer table)
Or should I achieve this another way?
Why or why not?
Public Class Task
Public ReadOnly Property TaskID() As Integer
Get
Return mTaskID
End Get
End Property
Public ReadOnly Property ProjectID() As Integer
Get
Return mProjectID
End Get
End Property
Public ReadOnly Property DeveloperID() As Integer
Get
Return mDeveloperID
End Get
End Property
'Constuctors...etc
End Class
I need to work with a DeveloperID and also the Developer's Name
When displaying to UI, I need to show the developer's, but when working with the database I need the developerid
Currently, the task class with get filled with data from the database and my
sql query only has the developerid.
Should I modify the query to include the the developer's name? (I would need to create a join and then pull from the
developer table)
Or should I achieve this another way?
Why or why not?
Public Class Task
Public ReadOnly Property TaskID() As Integer
Get
Return mTaskID
End Get
End Property
Public ReadOnly Property ProjectID() As Integer
Get
Return mProjectID
End Get
End Property
Public ReadOnly Property DeveloperID() As Integer
Get
Return mDeveloperID
End Get
End Property
'Constuctors...etc
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
-Joe