VS 2017 RC .net core ef+ MySql 出現錯誤


在di注入時會出現錯誤 

MySql.Data.EntityFrameworkCore.Storage.Internal.MySQLCommandBuilderFactory..ctor(ISensitiveDataLogger<RelationalCommandBuilderFactory> logger, DiagnosticSource diagnosticSource, IRelationalTypeMapper typeMapper

添加依賴項時添加MySql.Data.EntityFrameworkCore 6.10.0-alpha

編輯當前csproj:

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

  <PropertyGroup>
    <TargetFramework>netcoreapp1.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="MySql.Data.EntityFrameworkCore" Version="6.10.0-alpha" />
  </ItemGroup>

  </ItemGroup>

</Project>
View Code

問題解決!

 -----更新-----

同樣解決分頁問題

      var applys = await query.OrderBy(a => a.GmtCreated).Skip(pagingParams.Skip).Take(pagingParams.PageSize).ToListAsync();
View Code

 

github:https://github.com/aspros-luo/Aspros_DDD_Demo

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM