L
Leo Seccia
Hello everyone,
I have a c# project with a sql server database.
I have a number of lookup tables in my database which I successfully managed
to import into my LINQ dataclasses.
eg.
Table: tlkpColor
(PK) tlkpColorID
strDescription
dtmCreate
strCreateUser
Table: tlkpCompanyType
(PK) tlkpCompanyTypeID
strDescription
dtmCreate
strCreateUser
an so on...
I would like to create a generic lookup object to inherit from for my lookup
objects generated from the tables. I have tried to create a generic object
and setting discriminator property to implement inheritance as seen on some
tutorials on the net but I'm just not having any luck (and I have spent a
long time on this).
eg.
Table: tlkpGeneric
strDescription
dtmCreate
strCreateUser
Table: tlkpColor
(PK) tlkpColorID
Table: tlkpCompanyType
(PK) tlkpCompanyTypeID
etc...
I've also tried other combinations (eg. overring properties in subclasses)
Essentially, I would like to union all my lookup tables into one generic one
with a composite primary key (id + type/discriminator value) but using
inheritance.
Am I tackling this the right way?
I hope I am making sense, sorry if I am not. Please let me know if I need to
clarify anything.
Thank in advance,
Leo
I have a c# project with a sql server database.
I have a number of lookup tables in my database which I successfully managed
to import into my LINQ dataclasses.
eg.
Table: tlkpColor
(PK) tlkpColorID
strDescription
dtmCreate
strCreateUser
Table: tlkpCompanyType
(PK) tlkpCompanyTypeID
strDescription
dtmCreate
strCreateUser
an so on...
I would like to create a generic lookup object to inherit from for my lookup
objects generated from the tables. I have tried to create a generic object
and setting discriminator property to implement inheritance as seen on some
tutorials on the net but I'm just not having any luck (and I have spent a
long time on this).
eg.
Table: tlkpGeneric
strDescription
dtmCreate
strCreateUser
Table: tlkpColor
(PK) tlkpColorID
Table: tlkpCompanyType
(PK) tlkpCompanyTypeID
etc...
I've also tried other combinations (eg. overring properties in subclasses)
Essentially, I would like to union all my lookup tables into one generic one
with a composite primary key (id + type/discriminator value) but using
inheritance.
Am I tackling this the right way?
I hope I am making sense, sorry if I am not. Please let me know if I need to
clarify anything.
Thank in advance,
Leo