【问题标题】:c# Add System.Data.DataSetExtensions to .net core web api applicationc# 将 System.Data.DataSetExtensions 添加到 .net core web api 应用程序
【发布时间】:2018-10-04 19:28:48
【问题描述】:

我是 .net 核心 API 的新手。我想在数据表上使用AsEnumerable,需要添加 System.Data.DataSetExtensions 作为我的项目的参考。我在我的项目下没有看到参考部分。

看来我需要编辑我的 csproj 文件。这就是我的 csproj 文件现在的样子。

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Dapper" Version="1.50.5" />
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.3" />
    <PackageReference Include="NLog.Web.AspNetCore" Version="4.7.0" />
    <PackageReference Include="Z.Dapper.Plus" Version="1.3.26" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
  </ItemGroup>

</Project>

如何将System.Data.DataSetExtensions 添加到我现有的项目中?谢谢大家。

【问题讨论】:

    标签: c# .net asp.net-core datatable


    【解决方案1】:

    这是一个 NuGet 包:https://www.nuget.org/packages/System.Data.DataSetExtensions/

    所以在你的项目中添加一个 PackageReference:

     <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
    

    【讨论】:

    • 谢谢!这对我来说太愚蠢了。我能够从 nuget 获得。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-26
    • 1970-01-01
    • 1970-01-01
    • 2012-01-23
    相关资源
    最近更新 更多