FastMapperEmit 1.1.1
dotnet add package FastMapperEmit --version 1.1.1
NuGet\Install-Package FastMapperEmit -Version 1.1.1
<PackageReference Include="FastMapperEmit" Version="1.1.1" />
paket add FastMapperEmit --version 1.1.1
#r "nuget: FastMapperEmit, 1.1.1"
// Install FastMapperEmit as a Cake Addin #addin nuget:?package=FastMapperEmit&version=1.1.1 // Install FastMapperEmit as a Cake Tool #tool nuget:?package=FastMapperEmit&version=1.1.1
FastMapperEmit
根据需要进行实体间转换
将实体进行转换,采用EMIT;
将实体转换分成几类,可以实体间公共属性转换,字段间转换,字段与属性转换。
样例:
最简单的属性间转换
var r = FastMap.Mapper<Users>(new UserInfo() { UserName = "ww", Age = 12, Id = "23", psw = 345 });
设置字段间转换:
var r = FastMap.Mapper<Users>(new UserInfo() { UserName = "ww", Age = 12, Id = "23", psw = 345 }, MapType.FTF);
增加转换后需要处理的方法:
var r= FastMap.Mapper<UserInfo, Users>(new UserInfo() { UserName = "ww", Age = 12, Id = "23", psw = 345 }, MapType.PTP, new Action<UserInfo, Users>((k, V) ⇒ {
V.Name = k.UserName;
}));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- System.Reflection.Emit.Lightweight (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
升级net7