M
Mike
I'm trying to get my head round designing business objects in C# to use with
an ASP.NET application. For example, I have a table in my db for Adverts.
The fields look like this:
AdvertID int PK
AdvertTypeID int FK
IssueID int FK
PageID int FK
OrderID int FK
There's a bit more than that, but the point I want to illustrate is that the
majority of the fields are FKs on other tables. It's easy to see which
values I need when thinking of inserting or updating the object's data, but
when I want to get an Advert object (or a collection of them for display) I
need to do a join in the SQL to bring in values from related tables for eg
the AdvertType that is related to the AdvertTypeID. Therefore, my question
is, does string AdvertType belong as a property of Advert as well as int
AdvertTypeID?
Does anyone have any good links that will help me clarify this in my head?
Mike
an ASP.NET application. For example, I have a table in my db for Adverts.
The fields look like this:
AdvertID int PK
AdvertTypeID int FK
IssueID int FK
PageID int FK
OrderID int FK
There's a bit more than that, but the point I want to illustrate is that the
majority of the fields are FKs on other tables. It's easy to see which
values I need when thinking of inserting or updating the object's data, but
when I want to get an Advert object (or a collection of them for display) I
need to do a join in the SQL to bring in values from related tables for eg
the AdvertType that is related to the AdvertTypeID. Therefore, my question
is, does string AdvertType belong as a property of Advert as well as int
AdvertTypeID?
Does anyone have any good links that will help me clarify this in my head?
Mike