在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>
问题解决!
-----更新-----
同样解决分页问题
var applys = await query.OrderBy(a => a.GmtCreated).Skip(pagingParams.Skip).Take(pagingParams.PageSize).ToListAsync();