Autofac.WebApi2 6.1.1

Prefix Reserved
dotnet add package Autofac.WebApi2 --version 6.1.1
                    
NuGet\Install-Package Autofac.WebApi2 -Version 6.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Autofac.WebApi2" Version="6.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Autofac.WebApi2" Version="6.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Autofac.WebApi2" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Autofac.WebApi2 --version 6.1.1
                    
#r "nuget: Autofac.WebApi2, 6.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Autofac.WebApi2&version=6.1.1
                    
Install Autofac.WebApi2 as a Cake Addin
#tool nuget:?package=Autofac.WebApi2&version=6.1.1
                    
Install Autofac.WebApi2 as a Cake Tool

Autofac.WebApi

ASP.NET Web API integration for Autofac.

Build status

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

Quick Start

To get Autofac integrated with Web API you need to reference the Web API 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();

  // Get your HttpConfiguration.
  var config = GlobalConfiguration.Configuration;

  // Register your Web API controllers.
  builder.RegisterApiControllers(Assembly.GetExecutingAssembly());

  // OPTIONAL: Register the Autofac filter provider.
  builder.RegisterWebApiFilterProvider(config);

  // OPTIONAL: Register the Autofac model binder provider.
  builder.RegisterWebApiModelBinderProvider();

  // Set the dependency resolver to be Autofac.
  var container = builder.Build();
  config.DependencyResolver = new AutofacWebApiDependencyResolver(container);
}

Check out the documentation for more usage details.

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 Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (83)

Showing the top 5 NuGet packages that depend on Autofac.WebApi2:

Package Downloads
Autofac.WebApi2.Owin

ASP.NET Web API OWIN integration for Autofac.

iRely.Common

iRely.Common

BumperLane.Tenant.Api.Framework

Framework for BumperLane API sites

Purplelight.Framework.Autofac.Integration.WebApi

Productivity enhancements to Autofac WebApi Integration

TouchConvert.Tenant.Api.V1.Dtos

Data transfer objects for TouchConvert version one APIs.

GitHub repositories (25)

Showing the top 20 popular GitHub repositories that depend on Autofac.WebApi2:

Repository Stars
smartstore/SmartStoreNET
Open Source ASP.NET MVC Enterprise eCommerce Shopping Cart Solution
fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat
可能是全网最完整的 C# 版微信 SDK,封装全部已知的微信 OpenAPI,包含微信公众平台(订阅号+服务号+小程序+小游戏+小商店+视频号)、微信开放平台、微信商户平台(微信支付+微企付)、企业微信、微信广告平台、微信智能对话开放平台等模块,可跨平台。持续随官方更新,欢迎 Star/Fork/PR。QQ 交流群 875580418【满】、930461548【满】、611974621。
NuGet/NuGetGallery
NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
filipw/Strathweb.CacheOutput
ASP.NET Web API CacheOutput - library to allow you to cache the output of ApiControllers
ivaylokenov/MyTested.WebApi
Fluent testing framework for ASP.NET Web API 2.
duyanming/Viper
Viper 是一个基于Anno微服务引擎开发的Dashboard示例项目。Anno 底层通讯采用 grpc、thrift。自带服务发现、调用链追踪、Cron 调度、限流、事件总线等等
IdentityManager/IdentityManager
User & Identity Management
gmf520/osharp-v4
osharp framework with .net framework version 4.x
autofac/Examples
Example projects that consume and demonstrate Autofac IoC functionality and integration
filipw/apress-recipes-webapi
Samples from ASP.NET Web API 2: Recipes book.
jaegertracing/jaeger-client-csharp
🛑 This library is DEPRECATED!
microsoft/Appsample-Photosharing
Sample code for a UWP photo sharing app.
daxnet/we-text
WeText is a sample application that demonstrates the implementation of DDD/CQRS and microservice architectural patterns in C#.
chsakell/spa-webapi-angularjs
Building Single Page Applications using Web API and AngularJS
Azure/azure-iot-remote-monitoring
Azure IoT Remote Monitoring preconfigured solution
cuongle/Hmac.WebApi
Hmac authentication with ASP.NET Web Api
OfficeDev/microsoft-teams-apps-icebreaker
Icebreaker is an open-source app for Microsoft Teams that helps the whole team get closer by pairing members up every week at random to meet for coffee, burgers, pizza, or a walk around the block.
microsoft/BotBuilder-CognitiveServices
The Microsoft Cognitive Services controls for Microsoft Bot Builder
aspnet/AspNetWebHooks
Libraries to create and consume web hooks on ASP.NET 4.x (Due to other priorities this project is currently in maintenance mode only. There are no planned releases at this time. No new features are planned and we are only addressing critical issues as required.)
lampo1024/TsBlog
一个基于ASP.NET MVC 5+Repository+Autofac+AutoMapper+SqlSugar 的系列教程
Version Downloads Last updated
6.1.1 2,113,517 8/2/2022
6.1.0 883,543 11/18/2021
6.0.1 1,677,731 12/1/2020
6.0.0 1,287,562 9/30/2020
5.0.0 3,566,366 1/30/2020
4.3.1 2,616,611 9/5/2019
4.3.0 265,195 8/15/2019
4.2.1 2,024,131 3/26/2019
4.2.0 3,583,323 6/21/2018
4.1.0 4,082,235 8/2/2017
4.0.1 4,491,829 10/24/2016
4.0.0 2,655,550 8/17/2016
4.0.0-rc3-225 4,006 8/3/2016
4.0.0-beta7-215 36,836 9/23/2015
3.4.0 4,800,945 8/17/2014
3.3.3 210,508 7/2/2014
3.3.0 81,461 5/9/2014
3.2.1 30,508 3/27/2014
3.2.0 60,424 1/28/2014
3.1.0 72,820 12/28/2013
3.0.0 65,228 10/24/2013