entityframework.extended 这个是个很好的扩展,不过由于默认是配置成MSSQL的,今天在github上面 看到一个解决方案,亲测可用,下面贴代码

1.在DbContext 修改默认的数据库架构
 public EcsDbContext(string connectionStringName)
            : base(connectionStringName)
        {
            Configuration.ProxyCreationEnabled = false;
        }

2.添加DbContextConfiguration

public class DbContextConfiguration : DbConfiguration
    {
        public DbContextConfiguration()
        {
            EntityFramework.Locator.Current.Register<EntityFramework.Batch.IBatchRunner>(() => new MySqlBatchRunner());
        }
    }