Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Set default scope to InRequestScope for ASP MVC app
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian Beard  
View profile  
 More options May 9 2012, 12:21 pm
From: Brian Beard <brian.be...@onspring.com>
Date: Wed, 9 May 2012 09:21:06 -0700 (PDT)
Local: Wed, May 9 2012 12:21 pm
Subject: Set default scope to InRequestScope for ASP MVC app

I am currently using Ninject 3 in an ASP MVC application. What is the best
way for me to setup the kernel so that the default scope is the Request
scope? Currently I'm having to setup all my bindings similar to the
following:

kernel.Bind<IRepository>().To<SqlRepository>().InRequestScope();


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Remo Gloor  
View profile  
 More options May 10 2012, 1:58 pm
From: Remo Gloor <remo.gl...@bbv.ch>
Date: Thu, 10 May 2012 19:58:02 +0200
Local: Thurs, May 10 2012 1:58 pm
Subject: Re: [ninject] Set default scope to InRequestScope for ASP MVC app

You can't! But you can use conventions to reduce the configuration.

Am 10.05.2012 um 19:55 schrieb "Brian Beard" <brian.be...@onspring.com<mailto:brian.be...@onspring.com>>:

I am currently using Ninject 3 in an ASP MVC application. What is the best way for me to setup the kernel so that the default scope is the Request scope? Currently I'm having to setup all my bindings similar to the following:

kernel.Bind<IRepository>().To<SqlRepository>().InRequestScope();

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ninject/-/n4cOtB6HOFcJ.
To post to this group, send email to ninject@googlegroups.com<mailto:ninject@googlegroups.com>.
To unsubscribe from this group, send email to ninject+unsubscribe@googlegroups.com<mailto:ninject+unsubscribe@googlegroup s.com>.
For more options, visit this group at http://groups.google.com/group/ninject?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jarrett Meyer  
View profile  
 More options May 10 2012, 3:03 pm
From: Jarrett Meyer <jarrettme...@gmail.com>
Date: Thu, 10 May 2012 15:03:18 -0400
Local: Thurs, May 10 2012 3:03 pm
Subject: Re: [ninject] Set default scope to InRequestScope for ASP MVC app

Would that be very difficult to do?
https://github.com/ninject/ninject/pull/55 My solution is a bit of a hack,
but it looks like it would work.

--
Jarrett Meyer
Email: jarrettme...@gmail.com
Web: JarrettMeyer.com <http://jarrettmeyer.com>
Twitter: @jarrettmeyer <http://twitter.com/jarrettmeyer>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Remo Gloor  
View profile  
 More options May 11 2012, 1:04 pm
From: Remo Gloor <remo.gl...@bbv.ch>
Date: Fri, 11 May 2012 19:04:49 +0200
Local: Fri, May 11 2012 1:04 pm
Subject: Re: [ninject] Set default scope to InRequestScope for ASP MVC app

No it is not difficult. I just never gave this a high enough priority to appear on the top of the todo list because this is not really an issue when using conventions.

Am 10.05.2012 um 21:03 schrieb "Jarrett Meyer" <jarrettme...@gmail.com<mailto:jarrettme...@gmail.com>>:

Would that be very difficult to do?  <https://github.com/ninject/ninject/pull/55> https://github.com/ninject/ninject/pull/55 My solution is a bit of a hack, but it looks like it would work.

--
Jarrett Meyer
Email: <mailto:jarrettme...@gmail.com> jarrettme...@gmail.com<mailto:jarrettme...@gmail.com>
Web: <http://jarrettmeyer.com> JarrettMeyer.com<http://JarrettMeyer.com>
Twitter: @jarrettmeyer<http://twitter.com/jarrettmeyer>

On Thu, May 10, 2012 at 1:58 PM, Remo Gloor <<mailto:remo.gl...@bbv.ch>remo.gl...@bbv.ch<mailto:remo.gl...@bbv.ch>> wrote:
You can't! But you can use conventions to reduce the configuration.

Am 10.05.2012 um 19:55 schrieb "Brian Beard" <<mailto:brian.be...@onspring.com>brian.be...@onspring.com<mailto:brian.be...@onspring.com>>:

I am currently using Ninject 3 in an ASP MVC application. What is the best way for me to setup the kernel so that the default scope is the Request scope? Currently I'm having to setup all my bindings similar to the following:
.
kernel.Bind<IRepository>().To<SqlRepository>().InRequestScope();

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To view this discussion on the web visit <https://groups.google.com/d/msg/ninject/-/n4cOtB6HOFcJ> https://groups.google.com/d/msg/ninject/-/n4cOtB6HOFcJ.
To post to this group, send email to <mailto:ninject@googlegroups.com> ninject@googlegroups.com<mailto:ninject@googlegroups.com>.
To unsubscribe from this group, send email to <mailto:ninject+unsubscribe@googlegroups.com> ninject+unsubscribe@googlegroups.com<mailto:ninject+unsubscribe@googlegroup s.com>.
For more options, visit this group at <http://groups.google.com/group/ninject?hl=en> http://groups.google.com/group/ninject?hl=en.

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To post to this group, send email to <mailto:ninject@googlegroups.com> ninject@googlegroups.com<mailto:ninject@googlegroups.com>.
To unsubscribe from this group, send email to <mailto:ninject%2Bunsubscribe@googlegroups.com> ninject+unsubscribe@googlegroups.com<mailto:ninject+unsubscribe@googlegroup s.com>.
For more options, visit this group at <http://groups.google.com/group/ninject?hl=en> http://groups.google.com/group/ninject?hl=en.

--
You received this message because you are subscribed to the Google Groups "ninject" group.
To post to this group, send email to ninject@googlegroups.com<mailto:ninject@googlegroups.com>.
To unsubscribe from this group, send email to ninject+unsubscribe@googlegroups.com<mailto:ninject+unsubscribe@googlegroup s.com>.
For more options, visit this group at http://groups.google.com/group/ninject?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »