将 MySql 与 Entity 框架一起使用时出现以下错误。我在 EntityConnectionStringBuilder 的连接字符串上将默认连接超时设置为 300000。如何在实体框架中解决这个问题?
Unhandled Exception: System.Data.EntityCommandExecutionException: An
error occurred while reading from the store provider's data reader. See the
inner exception for details. ---> MySql.Data.MySqlClient.MySqlException: Fatal
error encountered during data read. ---> MySql.Data.MySqlClient.MySqlException:
Reading from the stream has failed. ---> System.IO.EndOfStreamException: Attempted
to read past the end of the stream.
更新:我们如何为 ado.net 实体框架设置 net_read_timeout?