解决Code First MySql数据库 Specified key was too long; max key length is 767 bytes异常
需要给DbContext加上如下特性:
[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))] public class MyContext : DbContext { public MyContext() : base("name=MyContext") { } public DbSet<SyUser> SyUser { get; set; } }