The documentation states that I can turn on logging like this:
using (var context = new BlogContext())
{
context.Database.Log = Console.Write; // like this
context.Database.Log = logInfo => Debug.WriteLine(logInfo); // or like this
// Your code here...
// How can I turn off logging here ?
}
I don't see any information on how to turn it off. Can someone tell me how I can do this?
Just call
then you have turned of logging