Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: DbContext Connection events or overrides

$
0
0

Will that help you?

DbContext context = new DbContext();
context.Database.Connection.StateChange += Connection_StateChange;

void Connection_StateChange(object sender, StateChangeEventArgs e)
{  
    /// Work With
    /// e.CurrentState
    /// e.OriginalState
}

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>