How to use Ninject with ASP.NET MVC

Posted by: Code Climber, on 05 Feb 2009 | View original | Bookmarked: 0 time(s)

By default, the ASP.NET MVC framework instantiate controllers calling their default constructor. This makes using Dependency Injection impossible. But, as almost everything inside that framework, the logic with which a controller is instantiated can be replaced with you own logic. This can be done creating your own ControllerFactory, which is pretty simple. But if you are using one of the many popular DI/IoC libraries, that task is even simpler, since there are already custom controller factories...

Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1940 | Hits: 65

Similar Posts

  • Understanding the MvcRouteHandler and MvcHandler in ASP.NET MVC more
  • Use business rules engines to validate the input if your ASP.NET application uses complicated web forms and business logic to collect and process user data. more
  • Use MvcContrib Grid to Display a Grid of Data in ASP.NET MVC more
  • Presenting at ASP.NET Connections in Las Vegas more
  • MSDN Guidance on ASP.NET MVC vs WebForms and its Impact on my EF + ASP.NET Work more
  • Interviewing Javier Lozano 7 Nov 2009 (tonight) at 8pm PST more
  • New Entity Framework Feature CTP for VS2010 Beta 2 more
  • Using WCF with SQL Azure and Telerik OpenAccess more
  • November's Toolbox Column Now Online more
  • Html Encoding Nuggets With ASP.NET MVC 2 more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD