Link to home
Start Free TrialLog in
Avatar of JRockFL
JRockFLFlag for United States of America

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
Avatar of joesthebighmoe
joesthebighmoe
Flag of United States of America image

JRock, is your intention to build an object-oriented system, more specifically a business-object-oriented system? If so, I'm not sure exactly where to start. At first glance, your Task object looks a bit useless. It has no business meaning whatsoever, but rather looks like some sort of relatinship construct.
-Joe
ASKER CERTIFIED SOLUTION
Avatar of VBRocks
VBRocks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial