Can I be sure that Entity Framework validate connections got from the connection pool?
Consider the case:
- Some CRUD operations are running;
- SQL server stop;
- CRUD operations are failing;
- SQL server start.
Is it guaranteed that after SQL server start CRUD operations will not fail?
EF v1
Thanks in advance
upd: it turns out that ADO.NET is responsible for connection pooling, not EF. But in general the question remains;
If SQL Server stops all connections currently in pool will be broken. Connection pool doesn’t validate the state of the connection. You will most probably get exception for each broken connection but next calls will create new connection and CRUD operations will work again.
If your concern is about transaction the transaction will not survive failed SQL server. So CUD operations executed in transaction prior to SQL server failure will be rolled back.