P
Peter Morris
I have an instance of a business object, which belongs to a specific "object
space"
var objectSpace = new ObjectSpace();
var location = objectSpace.(etc).GetByName("My house");
Now I have a service which should work on the location
var publishService = unity.Resolve<IPublishService>();
publishService.Publish(location);
but the publish service also needs a reference to the objectSpace. Adding
the object space parameter to the parameters seems like a hack, using an
instance-per-request and setting publishService.ObjectSpace seems like it
might be easy to forget.
Is there a way to do something like
var publishService = unity.Resolve<IPublishService>(objectSpace);
Thanks
space"
var objectSpace = new ObjectSpace();
var location = objectSpace.(etc).GetByName("My house");
Now I have a service which should work on the location
var publishService = unity.Resolve<IPublishService>();
publishService.Publish(location);
but the publish service also needs a reference to the objectSpace. Adding
the object space parameter to the parameters seems like a hack, using an
instance-per-request and setting publishService.ObjectSpace seems like it
might be easy to forget.
Is there a way to do something like
var publishService = unity.Resolve<IPublishService>(objectSpace);
Thanks