Injecting dependencies into Entity Framework entities and projects
问题 Is there a way to inject dependencies into objects returned from an EF Linq context.Entities.Select(x => new Y {...}) projection? (I am using Simple Injector, but concept remains) Sort of thing I am trying to achieve: (this is just typed in, not compiled, sorry for any syntax errors/incompleteness) // person MAY be an entity, but probably more likely a class to serve a purpose public class Person { public string Name public DateTime DOB {get;set; } // what I want to achieve: note, I don't