J
James Curran
We are in the process of design a new of classes which are essenially
E/R object for our db tables. Each would have the standard CRUD operations.
We plan to have a common interface that they all implement, basically:
interface MyInterface
{
Read(int id);
Update(int id);
Delete(int id);
}
The problem is.... How do we put "Create" into the interface, since
besides the key field, it would need as parameters, each field for the
object, which would be different for each class. Using "params object[]
args" was considered, but we'd rather have the compile-time type checking.
Any ideas?
--
--
Truth,
James Curran
[erstwhile VC++ MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
E/R object for our db tables. Each would have the standard CRUD operations.
We plan to have a common interface that they all implement, basically:
interface MyInterface
{
Read(int id);
Update(int id);
Delete(int id);
}
The problem is.... How do we put "Create" into the interface, since
besides the key field, it would need as parameters, each field for the
object, which would be different for each class. Using "params object[]
args" was considered, but we'd rather have the compile-time type checking.
Any ideas?
--
--
Truth,
James Curran
[erstwhile VC++ MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com