Are you using an IoC? if so it should be a breeze.

if you are not (however in my opinion (almost) every .NET project should) ,
and you are also not worrying much about DI altogether, then you can setup a
static accessor to your instance. you might want to look into something
called "the singleton pattern".


the monorail container is generally used for monorail services.



On Fri, Oct 1, 2010 at 4:41 PM, Tim <[email protected]> wrote:

> I'm using an object-persistence framework for Amazon SimpleDB called
> Simple Savant (http://simplesavant.codeplex.com/)
> I ideally only want to use one instance of the main 'SimpleSavant'
> class as this will take advantage of the built in caching. I guess
> that this should all be happening in a custom service and included in
> the web.config.
>
> I've tried importing my service with id="Custom" as per some
> documentation but I get:
> "NotSupportedException: Id not supported Custom" in
> DefaultMonoRailContainer.cs
>
> How should I be implementing a service that can be reached from every
> controller?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.delver.com
http://www.musicglue.com
http://www.castleproject.org
http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to