EntityMappingDB 1.4.6
See the version list below for details.
dotnet add package EntityMappingDB --version 1.4.6
NuGet\Install-Package EntityMappingDB -Version 1.4.6
<PackageReference Include="EntityMappingDB" Version="1.4.6" />
paket add EntityMappingDB --version 1.4.6
#r "nuget: EntityMappingDB, 1.4.6"
// Install EntityMappingDB as a Cake Addin #addin nuget:?package=EntityMappingDB&version=1.4.6 // Install EntityMappingDB as a Cake Tool #tool nuget:?package=EntityMappingDB&version=1.4.6
EntityMappingDB
1.采用emit方法DataTable,IDataReader与实体相互转换。
2.DataTable,IDataReader转换实体: ToEntityList扩展方法
3.实体转换DataTable: FromEntityToTable扩展方法
4.如果实体转换DataTable带有特性: FromEntityToTableAttribute扩展方法
设计了三类特性ColumnType(列类型映射),DataField(列名称映射),NoColumn(没有对应的列,忽略该属性)
没有使用高级语法糖,应该.net 4.0及以上都可。 已经是.net standard版本
说明:
1.如果程序报错:没有找到列,则说明你使用了不同的数据转model,但是这些数据不一样。这时你可以使用重载方法,定一个唯一key
2.不出意外,该项目没有升级的必要,除非emit技术有更新
程序中默认使用了缓存,datatable需要不同的名称来区分并且使用缓存
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 (1)
Showing the top 1 NuGet packages that depend on EntityMappingDB:
Package | Downloads |
---|---|
Hikari.Integration.Entity
实体转换(采用Emit,DataTable,DataReader与List<T>相互转换) 替换其它扩展库 个人贡献,任意使用,希望保留版本和作者注释 |
GitHub repositories
This package is not used by any popular GitHub repositories.
修改decimal转换bug