AutoMapper.Extensions.Microsoft.DependencyInjection
12.0.1
Prefix Reserved
The functionality of this package is now included directly in AutoMapper.
dotnet add package AutoMapper.Extensions.Microsoft.DependencyInjection --version 12.0.1
NuGet\Install-Package AutoMapper.Extensions.Microsoft.DependencyInjection -Version 12.0.1
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" />
paket add AutoMapper.Extensions.Microsoft.DependencyInjection --version 12.0.1
#r "nuget: AutoMapper.Extensions.Microsoft.DependencyInjection, 12.0.1"
#:package AutoMapper.Extensions.Microsoft.DependencyInjection@12.0.1
#addin nuget:?package=AutoMapper.Extensions.Microsoft.DependencyInjection&version=12.0.1
#tool nuget:?package=AutoMapper.Extensions.Microsoft.DependencyInjection&version=12.0.1
AutoMapper extensions for Microsoft.Extensions.DependencyInjection
Scans assemblies and:
- adds profiles to mapping configuration
- adds value resolvers, member value resolvers, type converters to the container.
To use, with an IServiceCollection instance and one or more assemblies:
services.AddAutoMapper(assembly1, assembly2 /*, ...*/);
or marker types:
services.AddAutoMapper(type1, type2 /*, ...*/);
This registers AutoMapper:
- As a singleton for the
MapperConfiguration - As a transient instance for
IMapper ITypeConverterinstances as transientIValueConverterinstances as transientIValueResolverinstances as transientIMemberValueResolverinstances as transientIMappingActioninstances as transient
Mapping configuration is static as it is the root object that can create an IMapper.
Mapper instances are registered as transient. You can configure this with the serviceLifetime parameter. Be careful changing this, as Mapper takes a dependency on a factory method to instantiate the other extensions.
Mapper.Map usage
To map at runtime, add a dependency on IMapper:
public class EmployeesController {
private readonly IMapper _mapper;
public EmployeesController(IMapper mapper)
=> _mapper = mapper;
// use _mapper.Map to map
}
ProjectTo usage
Starting with 8.0 you can use IMapper.ProjectTo. The old ProjectTo is an extension method and does not have dependency injection available. Pass an IConfigurationProvider instance directly:
var orders = await dbContext.Orders
.ProjectTo<OrderDto>(_configurationProvider)
.ToListAsync();
Or you can use an IMapper instance:
var orders = await dbContext.Orders
.ProjectTo<OrderDto>(_mapper.ConfigurationProvider)
.ToListAsync();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- AutoMapper (= 12.0.1)
- Microsoft.Extensions.Options (>= 6.0.0)
NuGet packages (938)
Showing the top 5 NuGet packages that depend on AutoMapper.Extensions.Microsoft.DependencyInjection:
| Package | Downloads |
|---|---|
|
Omnia.Fx.NetCore
Package Description |
|
|
Elsa.Core
Elsa is a set of workflow libraries and tools that enable lean and mean workflowing capabilities in any .NET Core application. This package contains the core of Elsa. Tip: reference the `Elsa` package instead of this one. |
|
|
Omnia.Fx.NetCore.Runtime
Package Description |
|
|
VirtoCommerce.ExperienceApiModule.Core
Experiene API functionality |
|
|
Relay.Core.Plugins.AutoMapper
Plugins available for the Core framework |
GitHub repositories (180)
Showing the top 20 popular GitHub repositories that depend on AutoMapper.Extensions.Microsoft.DependencyInjection:
| Repository | Stars |
|---|---|
|
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
|
|
|
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
|
|
|
dotnet-architecture/eShopOnWeb
Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb
|
|
|
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
|
|
|
jasontaylordev/NorthwindTraders
Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.
|
|
|
dotnetcore/DotnetSpider
DotnetSpider, a .NET standard web crawling library. It is lightweight, efficient and fast high-level web crawling & scraping framework
|
|
|
Ombi-app/Ombi
Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
|
|
|
dotnet/samples
Sample code referenced by the .NET documentation
|
|
|
fullstackhero/blazor-starter-kit
Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
|
|
|
ardalis/ApiEndpoints
A project for supporting API Endpoints in ASP.NET Core web applications.
|
|
|
grandnode/grandnode
Open source, headless, multi-tenant eCommerce platform built with .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, Vue.js.
|
|
|
CXWorld/CapFrameX
Frametime capture and analysis tool
|
|
|
optimajet/WorkflowEngine.NET
Workflow Engine by Optimajet, the embeddable workflow engine for .NET and C#. Approvals, state machines and long-running processes with a visual Workflow Designer, BPMN import and six databases.
|
|
|
HenJigg/wpf-abp
Cross-platform mobile project and WPF client based on ABP framework Xamarin.Forms
|
|
|
CodeMazeBlog/CodeMazeGuides
Source code for 800+ C# and .NET articles from code-maze.com. Every article is a runnable solution, most with tests.
|
|
|
dotnetzoom/AspNetCore-WebApi-Course
🥇 Professional REST API design with ASP.NET Core WebAPI
|
|
|
Amitpnk/Onion-architecture-ASP.NET-Core
WhiteApp API solution template which is built on Onion Architecture with all essential feature using .NET 8!
|
|
|
luoyunchong/lin-cms-dotnetcore
😃A simple and practical CMS implemented by .NET + FreeSql;前后端分离、Docker部署、OAtuh2授权登录、自动化部署DevOps、自动同步至Gitee、代码生成器、仿掘金专栏
|
|
|
VictorTzeng/Zxw.Framework.NetCore
基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~
|
|
|
DotNetNext/WebFirst
.NET CORE 代码生成器 ,Web中使用CodeFirst模式, 实体 生成器,UI代码 生成器,在线建表,PostgresSql生成器,达梦生成器,金仓生成器MySql生成器,SQLServere生成器、Oracle生成器、Sqlite生成器、导出文档,模版配置, WEB代码生成器 ,API代码生成器
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 12.0.1 | 90,848,805 | 4/9/2023 | |
| 12.0.0 | 51,814,070 | 9/30/2022 | |
| 11.0.0 | 52,894,859 | 1/5/2022 | |
| 8.1.1 | 63,547,321 | 2/5/2021 | |
| 8.1.0 | 15,067,538 | 10/14/2020 | |
| 8.0.1 | 13,356,746 | 7/16/2020 | |
| 8.0.0 | 894,969 | 7/9/2020 | |
| 7.0.0 | 41,859,267 | 8/12/2019 | |
| 6.1.1 | 5,728,859 | 6/4/2019 | |
| 6.1.0 | 4,180,969 | 4/29/2019 | |
| 6.0.0 | 12,856,611 | 11/18/2018 | |
| 5.0.1 | 7,044,602 | 7/20/2018 | |
| 4.0.1 | 6,337,887 | 6/18/2018 | |
| 3.2.0 | 4,923,376 | 11/16/2017 | |
| 3.1.0 | 334,657 | 10/26/2017 | |
| 3.0.1 | 650,000 | 8/19/2017 | |
| 2.0.1 | 1,088,427 | 3/30/2017 |