{"action":"closed","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/559","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/559/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/559/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/559/events","html_url":"https://github.com/npgsql/npgsql/issues/559","id":64939195,"number":559,"title":"Unsupported IsolationLevel: Unspecified","user":{"login":"mikkeljohnsen","id":4332970,"avatar_url":"https://avatars.githubusercontent.com/u/4332970?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkeljohnsen","html_url":"https://github.com/mikkeljohnsen","followers_url":"https://api.github.com/users/mikkeljohnsen/followers","following_url":"https://api.github.com/users/mikkeljohnsen/following{/other_user}","gists_url":"https://api.github.com/users/mikkeljohnsen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeljohnsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeljohnsen/subscriptions","organizations_url":"https://api.github.com/users/mikkeljohnsen/orgs","repos_url":"https://api.github.com/users/mikkeljohnsen/repos","events_url":"https://api.github.com/users/mikkeljohnsen/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeljohnsen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-28T12:46:22Z","updated_at":"2015-03-28T14:12:16Z","closed_at":"2015-03-28T14:12:16Z","body":"I just started to use/test Npgsql 3.0 and is now using DbConnection (instead of IDbConnection). But I get this error when using Transactions:\r\n------\r\nUnsupported IsolationLevel: Unspecified\r\n  at Npgsql.NpgsqlConnection.BeginTransaction (IsolationLevel level) [0x0006b] in /home/mkj/rpm/BUILD/npgsql-master/src/Npgsql/NpgsqlConnection.cs:579 \r\n  at Npgsql.NpgsqlConnection.BeginDbTransaction (IsolationLevel isolationLevel) [0x00000] in /home/mkj/rpm/BUILD/npgsql-master/src/Npgsql/NpgsqlConnection.cs:540 \r\n  at System.Data.Common.DbConnection.BeginTransaction () [0x00000] in /home/mkj/rpm/BUILD/mono-3.12.1/mcs/class/System.Data/System.Data.Common/DbConnection.cs:82 \r\n  at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction () [0x00000] in /home/mkj/rpm/BUILD/mono-3.12.1/mcs/class/System.Data/System.Data.Common/DbConnection.cs:730 \r\n  at OpenMedicus.Settings.Booking.OnOkClicked (System.Object o, System.EventArgs args) [0x00031] in /home/mkj/Projects/XMedicus/modules/booking/SettingsBooking.cs:493 \r\n--------\r\n\r\nI can see that in Mono/.Net DbConnection the Default IsolationLevel is Unspecified.\r\n\r\nHow do I set the default IsolationLevel to ReadComitted ?\r\n\r\nIn the \"DbConnection.cs\" I see only:\r\nprotected abstract DbTransaction BeginDbTransaction (IsolationLevel isolationLevel);\r\nSo there is no way to override the default IsolationLevel from overriding in Npgsql.\r\n\r\nI really don't want to have to specify it every time. My solution for now is this change to NpgsqlConnection.cs:\r\n\r\n        protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)\r\n        {\r\n            return BeginTransaction(isolationLevel == IsolationLevel.Unspecified ? IsolationLevel.ReadCommitted : isolationLevel);\r\n        }\r\n\r\nIs that a solution we could adobt ?\r\n"}}