2017-02-10 18 views
0

イムEFコアが、私のencodigリターン間違って、エンコーディングのMySQL EFコア

Databseの設定でSQLクエリ実行:

  • 文字セット:latin1の
  • 照合:latin1_general_ci

をデータベース - エンジンInnoDb - 文字セット:latin1 - 照合:latin1_general_ci

これは

enter image description here

enter image description here

リポジトリ

public Repository(CrmGatewayCarteirasContext context) 
    { 
     Context = context; 
     DbSet = context.Set<TEntity>(); 
    } 

    public void Dispose() 
    { 
     Dispose(true); 
     GC.SuppressFinalize(this); 
    } 

    public IEnumerable<TEntity> GetAll() 
    { 
     return DbSet.ToList(); 
    } 

    protected virtual void Dispose(bool disposing) 
    { 
     if (_disposed) return; 
     _disposed = true; 
    } 

project.json

{ 
"dependencies": { 
    "Microsoft.NETCore.App": { 
     "version": "1.1.0", 
     "type": "platform" 
    }, 
    "Microsoft.AspNetCore.Routing": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", 
    "Serilog.Extensions.Logging": "1.3.1", 
    "Serilog.Sinks.RollingFile": "3.3.0", 
    "Serilog.Exceptions": "2.3.0", 
    "Seq.Extensions.Logging": "2.1.1", 
    "Serilog.Sinks.Seq": "3.2.0", 
    "Microsoft.EntityFrameworkCore.Design": { 
     "type": "build", 
     "version": "1.1.0" 
    }, 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", 
    "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", 
    "Microsoft.Extensions.Configuration.Json": "1.1.0", 
    "Microsoft.Extensions.Logging": "1.1.0", 
    "Microsoft.Extensions.Logging.Console": "1.1.0", 
    "Microsoft.Extensions.Logging.Debug": "1.1.0", 
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", 
    "AutoMapper": "5.2.0", 
    "AutoMapper.Extensions.Microsoft.DependencyInjection": "1.2.0", 
    "CrmGateway.SharedKernel": "1.0.0-*", 
    "Microsoft.ApplicationInsights.AspNetCore": "2.0.0", 
    "Microsoft.AspNetCore.Mvc": "1.1.1", 
    "SapientGuardian.EntityFrameworkCore.MySql": "7.1.18", 
    "StaticCommons": "1.4.0" 
}, 
"tools": { 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final", 
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final", 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.1.0-preview4-final", 
     "imports": [ 
      "portable-net45+win8+dnxcore50", 
      "portable-net45+win8" 
     ] 
    } 
}} 

答えて

0

バグを修正wiはMySQLのdBですエンコーディング。登録プロバイダ(CodePagesEncodingProvider.Instance);

https://github.com/kleberksms/mysql-connector-net-netstandard/blob/95651617dea59470a155f0dfb9805a92154f2485/Source/MySql.Data/Field.csで は歴史を参照してください。https://github.com/SapientGuardian/mysql-connector-net-netstandard/pull/32

+0

あなただけの「バグがリンクを参照してください、ありました」よりも、問題の長い要約を与えた場合、それが良いだろう。 –