Is there a mechanism to inject dependencies into Linq to Sql or entity framework entities? If so would it be a sensible approach?
A:
What exactly are you after? Note that you can use LINQ-to-SQL without the attributes, if you want to use existing classes... you need to use an external xml file to hold the mappings, and an XmlMappingSource
.
Note that this won't work with Entity Framework; only LINQ-to-SQL.
Marc Gravell
2008-10-26 21:50:00
+1
A:
Sorry I was not clear. I want to be able to inject sevices eg. IEmailer into linq to sql entities using one of the many dependancy injection frameworks eg. windsor spring, unity etc.
PhilHoy
2008-10-26 22:29:39