title: .Net Core2.2 : how to change characterset in EF codefirst approach
body: <p>I have tried using <code>Charset=utf8;</code> in the connection string and using <code>[MySqlCharset("utf8")]</code> in my model(which was not recognized by VsCode).
  I have also read about this method:</p>
  
  <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
      modelBuilder.Entity&lt;ComplexKey&gt;(e =&gt;
      {
        e.HasKey(p =&gt; new { p.Key1, p.Key2 });
        e.ForMySQLHasCollation("utf8"); // defining collation at Entity level
        e.Property(p =&gt; p.Key1).ForMySQLHasCharset("utf8"); // defining charset in a property
        e.Property(p =&gt; p.CollationColumnFA).ForMySQLHasCollation("utf8"); // defining collation in a property
      });
    }
  </code></pre>
  
  <p>but I have not tested it because I think it is tedious to do that for every single table and there should be an easier way.</p>