Now I see. shapper actually already gave me the answer in his reply,
Thanks. Your guys are great!
On Mar 21, 5:03 pm, Bart Deleye <
bart.del...@gmail.com> wrote:
> You can provide your own container instance like this:
> new ServiceLayerConfiguration(Assembly.GetExecutingAssembly(),
> typeof(PingRequest).Assembly,
> new Agatha.StructureMap.Container(ObjectFactory.Instance) )
>
>
>
>
>
>
>
> On Wed, Mar 21, 2012 at 8:59 PM, Whoever <
zhang...@gmail.com> wrote:
> > Still having trouble figuring this one out. In my service host
> > project, global.aspx, I have agatha service registration
>
> > new ServiceLayerConfiguration(Assembly.GetExecutingAssembly(),
> > typeof(PingRequest).Assembly,
> > typeof(Agatha.StructureMap.Container))
> > .RegisterRequestHandlerInterceptor<AuditInterceptor>()
> > .RegisterRequestHandlerInterceptor<ValidationInterceptor>()
> > .RegisterRequestHandlerInterceptor<AuthorizationInterceptor>()
> > .Use<RequestHandlerBasedConventions>().Initialize();
>
> > Here's my dependency registration (I know I must have missed something
> > here, it should be part of service layer registration?)
>
> > ObjectFactory.Configure(x => {
>
> > x.For<IRepository>().Use<GenericRepository>().Ctor<string>("connectionStrin gName").Is("DefaultDb");