dbcontext log action
using (var db = new DbEntities()) { db.Database.Log = msg => Debug.WriteLine(msg); }