This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, Is it possible to integrate a service locator into LightSpeed so that it can delegate the creation of entities, field convertors and UnitOfWork to that service locator? I have a number of services I wrote for encryption, hashing, random string generation, deal with blob storage, configuration and such that I'd like to use within overwritten methods in entities, field convertors and UnitOfWork classes. The lack of such support in EF caused a great deal of hurt. Thanks, Werner |
|
|
You can delegate entity creation using the LightSpeedContext.EntityFactory property. You can delegate unit of work creation using the LightSpeedContext.UnitOfWorkFactory property. We don't currently have way to delegate field converter creation but we could add this for you. We don't however plan to integrate a service locator directly into LightSpeed. Instead, the extensibility hooks above provide a way for you to inject your own service locator. We prefer this approach because different customers use different service locators / DI components. |
|
|
Thanks Ivan. You may want to follow a similiar pattern to ASP.NET MVC 3 as it provides the necessary infrastructure to integrate any IoC container or service.
locator.http://bradwilson.typepad.com/blog/2010/07/service-location-pt1-introduction.html Thanks, Werner |
|