{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4788","repository_url":"https://api.github.com/repos/aspnet/EntityFramework","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4788/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4788/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4788/events","html_url":"https://github.com/aspnet/EntityFramework/issues/4788","id":140695382,"number":4788,"title":"Database.BeginTransaction() fails after Database.EnsureCreatedAsync() called","user":{"login":"xatabhk","id":6814395,"avatar_url":"https://avatars.githubusercontent.com/u/6814395?v=3","gravatar_id":"","url":"https://api.github.com/users/xatabhk","html_url":"https://github.com/xatabhk","followers_url":"https://api.github.com/users/xatabhk/followers","following_url":"https://api.github.com/users/xatabhk/following{/other_user}","gists_url":"https://api.github.com/users/xatabhk/gists{/gist_id}","starred_url":"https://api.github.com/users/xatabhk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xatabhk/subscriptions","organizations_url":"https://api.github.com/users/xatabhk/orgs","repos_url":"https://api.github.com/users/xatabhk/repos","events_url":"https://api.github.com/users/xatabhk/events{/privacy}","received_events_url":"https://api.github.com/users/xatabhk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T14:49:01Z","updated_at":"2016-03-22T23:37:05Z","closed_at":null,"body":"Error message:\r\nbegintransaction sqlexception: New transaction is not allowed because there are other threads running in the session"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/200080259","html_url":"https://github.com/aspnet/EntityFramework/issues/4788#issuecomment-200080259","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4788","id":200080259,"user":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T23:37:05Z","updated_at":"2016-03-22T23:37:05Z","body":"Can you confirm that you are waiting on the call to `EnsureCreatedAsync()` to complete before calling `BeginTransaction()`? You can't have two concurrent operations running on a single context instance, so you need to use `await`, `Wait()`, etc. to ensure the first call completes before starting a new operation.\r\n\r\nIf you are waiting for completion, can you share a complete code listing (or project) that we can use to reproduce the issue."}}