Autofac.Mvc5
6.1.0
Prefix Reserved
dotnet add package Autofac.Mvc5 --version 6.1.0
NuGet\Install-Package Autofac.Mvc5 -Version 6.1.0
<PackageReference Include="Autofac.Mvc5" Version="6.1.0" />
paket add Autofac.Mvc5 --version 6.1.0
#r "nuget: Autofac.Mvc5, 6.1.0"
// Install Autofac.Mvc5 as a Cake Addin #addin nuget:?package=Autofac.Mvc5&version=6.1.0 // Install Autofac.Mvc5 as a Cake Tool #tool nuget:?package=Autofac.Mvc5&version=6.1.0
Autofac.Mvc
ASP.NET MVC integration for Autofac.
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
If you're working with ASP.NET Core, you want Autofac.Extensions.DependencyInjection, not this package.
Quick Start
To get Autofac integrated with MVC you need to reference this MVC integration NuGet package, register your controllers, and set the dependency resolver. You can optionally enable other features as well.
protected void Application_Start()
{
var builder = new ContainerBuilder();
// Register your MVC controllers. (MvcApplication is the name of
// the class in Global.asax.)
builder.RegisterControllers(typeof(MvcApplication).Assembly);
// OPTIONAL: Register model binders that require DI.
builder.RegisterModelBinders(typeof(MvcApplication).Assembly);
builder.RegisterModelBinderProvider();
// OPTIONAL: Register web abstractions like HttpContextBase.
builder.RegisterModule<AutofacWebTypesModule>();
// OPTIONAL: Enable property injection in view pages.
builder.RegisterSource(new ViewRegistrationSource());
// OPTIONAL: Enable property injection into action filters.
builder.RegisterFilterProvider();
// OPTIONAL: Enable action method parameter injection (RARE).
builder.InjectActionInvoker();
// Set the dependency resolver to be Autofac.
var container = builder.Build();
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
}
If you are using MVC as part of an OWIN application, you may be interested in the ASP.NET MVC OWIN integration.
Check out the Autofac ASP.NET MVC integration documentation for more information.
Get Help
Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Autofac (>= 6.4.0)
- Microsoft.AspNet.Mvc (>= 5.1.0)
- Microsoft.AspNet.Razor (>= 3.1.0)
- Microsoft.AspNet.WebPages (>= 3.1.0)
- Microsoft.Web.Infrastructure (>= 1.0.0)
NuGet packages (77)
Showing the top 5 NuGet packages that depend on Autofac.Mvc5:
Package | Downloads |
---|---|
Bnsights.Mvc
Bnsights.Mvc is RAD Helper DLL for MVC Projects in Bnsights DMCC. Also known as Bnsights Business Solutions Framework (BBSF). |
|
TouchConvert.Tenant.Api.V1.Dtos
Data transfer objects for TouchConvert version one APIs. |
|
Vault.MVC.V
Part of Vault libraries set designed to enhance usability of ASP.NET MVC 5+. |
|
TouchConvert.Tenant.Api.V2.Dtos
Data transfer objects for TouchConvert version two APIs. |
|
Bnsights.Mvc2
Bnsights.Mvc is RAD Helper DLL for MVC Projects in Bnsights DMCC. Also known as Bnsights Business Solutions Framework (BBSF). |
GitHub repositories (26)
Showing the top 5 popular GitHub repositories that depend on Autofac.Mvc5:
Repository | Stars |
---|---|
openiddict/openiddict-core
Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
|
|
smartstore/SmartStoreNET
Open Source ASP.NET MVC Enterprise eCommerce Shopping Cart Solution
|
|
NuGet/NuGetGallery
NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
|
|
fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat
可能是全网最完整的 C# 版微信 SDK,封装全部已知的微信 OpenAPI,包含微信公众平台(订阅号+服务号+小程序+小游戏+小商店+视频号)、微信开放平台、微信商户平台(微信支付+微企付)、企业微信、微信广告平台、微信智能对话开放平台等模块,可跨平台。持续随官方更新,欢迎 Star/Fork/PR。QQ 交流群 875580418【满】、930461548【满】、611974621。
|
|
optimajet/WorkflowEngine.NET
WorkflowEngine.NET - component that adds workflow in your application. It can be fully integrated into your application, or be in the form of a specific service (such as a web service).
|
Version | Downloads | Last updated |
---|---|---|
6.1.0 | 1,305,835 | 8/23/2022 |
6.0.0 | 2,913,658 | 9/28/2020 |
5.0.0 | 1,907,625 | 1/28/2020 |
4.0.2 | 8,709,665 | 4/10/2017 |
4.0.1 | 481,371 | 2/8/2017 |
4.0.0 | 1,599,811 | 8/10/2016 |
4.0.0-rc3-222 | 2,949 | 7/18/2016 |
4.0.0-rc3-219 | 4,435 | 7/1/2016 |
3.3.4 | 2,724,977 | 4/30/2015 |
3.3.3 | 636,735 | 9/4/2014 |
3.3.2 | 125,913 | 7/17/2014 |
3.3.1 | 113,597 | 7/2/2014 |
3.3.0 | 62,572 | 5/9/2014 |
3.2.1 | 35,752 | 3/27/2014 |
3.2.0 | 52,185 | 1/28/2014 |
3.1.0 | 55,518 | 12/28/2013 |
3.0.0 | 103,742 | 10/24/2013 |
3.0.0-rc1 | 5,515 | 9/3/2013 |
Release notes are at https://github.com/autofac/Autofac.Mvc/releases