ListToDataTableCore 1.2.0

dotnet add package ListToDataTableCore --version 1.2.0                
NuGet\Install-Package ListToDataTableCore -Version 1.2.0                
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="ListToDataTableCore" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ListToDataTableCore --version 1.2.0                
#r "nuget: ListToDataTableCore, 1.2.0"                
#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.
// Install ListToDataTableCore as a Cake Addin
#addin nuget:?package=ListToDataTableCore&version=1.2.0

// Install ListToDataTableCore as a Cake Tool
#tool nuget:?package=ListToDataTableCore&version=1.2.0                

List<T> 转换DataTable(VS2019)

如果model类带有特性转换

FormEntityToTableMap (IList<T>扩展方法)

没有特性
FormEntityToTable (IList<T>扩展方法)

设计了三类特性ColumnType(列类型映射),DataField(列名称映射),NoColumn(没有对应的列,忽略该属性)

没有使用高级语法糖,应该.net 4.0及以上都可以,如果使用了低版本的.net,直接复制源码文件即可


升级

2019-03-01 支持Model类的可空类型

至此该功能基本完成,应该没有需要修改的了;
最后因为.net standard不支持emit实现,如果发布的版本支持以后将实现.net standard版本

该库现在可以被EntityMappingDBEmitCore 代替

Product 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. 
.NET Core netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 707 2/28/2019
1.0.1 602 2/26/2019
1.0.0 593 2/26/2019

采用emit将List<T>转换DataTable