Hi,
I am writing a small program. The interface I am writing to control each repository that is made defines a method of Save(IPublicObject). I am using LINQ for the SQL Version of the repository CRUD. My question is this. I would like to have only the one method which accepts the interface type. I want to think how I can best locate the Save action for the inherited type I then pass in.
In the book I am reading Patterns of Enterprise Application Architecture. I am leaning on the Inheritance Maping. So I create a derived object of
pubic class ConcretePublicObjectOne : IPublicObject{}
I want to then pass this into the Save Function of the respository and it is at this point I am trying to think how best to say, ok we need to use "WHAT?" Save Method etc...
Should I use a registry, configuration setting mapping the types?
Cheers for the help in advance
Andrew