0

I know that from version 6 EntityFramework supports connection resiliency feature when working with SQL Azure database. I am pretty sure it applies to DbSet context members.

But what if I want to execute SQL query against the database like that:

context.Database.SqlQuery<User>("select * from Users");

Is it safe to perform this operation like that? Do I need to use any Retry frameworks here? I guess no, but I want to make sure.

Andrei
  • 42,814
  • 35
  • 154
  • 218

1 Answers1

1

Short version: Yes.

Long versions: The connection resilience is applied on the IDbConnection level. That direct sql query only generates a new IDbCommand that will be delivered to the sever by the same IDbConnection as all the others.

João Silva
  • 569
  • 3
  • 9