Does anyone know if Database.SqlQuery is doing something under the hood that will make it unsafe (for example, creating or attracting a transaction, etc ...)?
This is part of the code that I must call from several threads - the request is very direct, hard-coded (without access to the general data of the user code):
public virtual long GetId(string sql)
{
var newid = DbContext.Database.SqlQuery<long>(sql).First();
return newid;
}
My goal is to go through during the minor version - then we will have the opportunity to correctly synchronize, if necessary.
source
share