I have the following code:
public void DequeueRecipe(AuthIdentity identity, params Guid[] recipeIds)
{
using (var session = GetSession())
{
var r
Because session
is wrapped in a using statement, and the LINQ execution could be defered until it is enumerated.
Resharper is warning that this could result in an exception, because by the time dbRecipes
is enumerated, the session
could have have been disposed.
I'll be honest: I'm not sure the above code could ever fail in the way warned about.