简体   繁体   English

automapper.extensions.microsoft.dependencyinjection 和 automapper nuget 包有什么区别?

[英]What is the difference between automapper.extensions.microsoft.dependencyinjection and automapper nuget packages?

我在我的 .net core 3.1 项目中发现了两个用于集成映射器的 nuget 包,我只使用 automapper.extensions.microsoft.dependencyinjection 并且它有效,我看到了 AutoMapper Nuget 的另一种方法,在第一个中我看到了 AutoMapper 的依赖项,但在我的例子中它没有这个就可以工作。

The NuGet package AutoMapper.Extensions.Microsoft.DependencyInjection will also load the dependend packages (listed under dependencies) into your project. NuGet 包AutoMapper.Extensions.Microsoft.DependencyInjection还会将依赖包(在依赖项下列出)加载到您的项目中。

It is the same as if you would manually add这与您手动添加相同

  • AutoMapper自动映射器
  • Microsoft.Extensions.DependencyInjection.Abstractions Microsoft.Extensions.DependencyInjection.Abstractions
  • AutoMapper.Extensions.Microsoft.DependencyInjection AutoMapper.Extensions.Microsoft.DependencyInjection

to your project.到您的项目。

当我们使用 Automapper 扩展时,我们还需要在启动文件中注册依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AutoMapper.Extensions.Microsoft.DependencyInjection 6.0.0 中“ResolveUsing”的替代方法是什么 - What is the alternative of "ResolveUsing" in AutoMapper.Extensions.Microsoft.DependencyInjection 6.0.0 AutoMapper:PreserveReferences和MaxDepth有什么区别? - AutoMapper: What is the difference between PreserveReferences and MaxDepth? AutoMapper:ForMember() 和 ForPath() 有什么区别? - AutoMapper: What is the difference between ForMember() and ForPath()? AutoMapper - Condition和PreCondition之间有什么区别 - AutoMapper - What's difference between Condition and PreCondition Facebook WebMVC和Facebook NuGet软件包之间有什么区别? - What is the difference between the FacebookWebMVC the Facebook NuGet packages? Automapper Nuget Package失败 - Automapper Nuget Package failed 如何在 Microsoft.Extensions.DependencyInjection 中注册类型? - How to register types in Microsoft.Extensions.DependencyInjection? class 库中的 Microsoft.Extensions.DependencyInjection - Microsoft.Extensions.DependencyInjection in a class library 找不到方法:“Microsoft.Extensions.DependencyInjection.ServiceProvider” - Method not found: 'Microsoft.Extensions.DependencyInjection.ServiceProvider' Microsoft.Extensions.DependencyInjection 是使用 singleton 概念吗? - Is Microsoft.Extensions.DependencyInjection using singleton concept?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM