Hi
Does anyone know how to have dependency injection work with linq2sql. Heres my situation..
I will explain it as best i can here.
I have a base class which has a DBML (linq2sql) and classes etc .. This DBML is COMMON to more than 1 project.. Well each project has its own DBML but has all the tables etc that is in the common dbml i am using in the base class - does that make sense?!
Each of my projects creates a new class by inheriting the base class and extending it... but of course i need to REINJECT my dbml because the dbml that i use specifically in my project has all the functionality that was in COMMON and then some
I am a little lost here.. Anyone know how to achieve this.. I do hope i explained it well enough :-)
I was hoping to use unity or something similar, the classes that are created by linq2sql don't seem to implement interfaces... is this going to be a issues with DI?
Thanks