{"action":"created","issue":{"url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/211","labels_url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/211/comments","events_url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/211/events","html_url":"https://github.com/jonwagner/Insight.Database/issues/211","id":92198047,"number":211,"title":"DBNull to default(t) silent successful conversion for non-nullable types","user":{"login":"jamezor","id":318188,"avatar_url":"https://avatars.githubusercontent.com/u/318188?v=3","gravatar_id":"","url":"https://api.github.com/users/jamezor","html_url":"https://github.com/jamezor","followers_url":"https://api.github.com/users/jamezor/followers","following_url":"https://api.github.com/users/jamezor/following{/other_user}","gists_url":"https://api.github.com/users/jamezor/gists{/gist_id}","starred_url":"https://api.github.com/users/jamezor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamezor/subscriptions","organizations_url":"https://api.github.com/users/jamezor/orgs","repos_url":"https://api.github.com/users/jamezor/repos","events_url":"https://api.github.com/users/jamezor/events{/privacy}","received_events_url":"https://api.github.com/users/jamezor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-30T20:56:25Z","updated_at":"2015-08-23T21:42:40Z","closed_at":"2015-08-23T21:42:40Z","body":"We have been bitten by a unexpectedly successful conversion from DBNull to default(t) for non-nullable types.\r\n\r\ne.g. `connection.ExecuteScalarSql<int>(\"select unexpectedly_null_value from a_table\")` will return 0; whereas we expected this to explode and highlight that the query was incorrect.\r\n\r\nThe fix is obviously to correct our query to filter out null results (or whatever); but it would be great if this type of silent conversion did not occur."},"comment":{"url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/comments/133941944","html_url":"https://github.com/jonwagner/Insight.Database/issues/211#issuecomment-133941944","issue_url":"https://api.github.com/repos/jonwagner/Insight.Database/issues/211","id":133941944,"user":{"login":"jonwagner","id":1652596,"avatar_url":"https://avatars.githubusercontent.com/u/1652596?v=3","gravatar_id":"","url":"https://api.github.com/users/jonwagner","html_url":"https://github.com/jonwagner","followers_url":"https://api.github.com/users/jonwagner/followers","following_url":"https://api.github.com/users/jonwagner/following{/other_user}","gists_url":"https://api.github.com/users/jonwagner/gists{/gist_id}","starred_url":"https://api.github.com/users/jonwagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonwagner/subscriptions","organizations_url":"https://api.github.com/users/jonwagner/orgs","repos_url":"https://api.github.com/users/jonwagner/repos","events_url":"https://api.github.com/users/jonwagner/events{/privacy}","received_events_url":"https://api.github.com/users/jonwagner/received_events","type":"User","site_admin":false},"created_at":"2015-08-23T21:42:40Z","updated_at":"2015-08-23T21:42:40Z","body":"I've made the change in the 6.0 branch, because it will change behavior for existing users.\r\nIt's more consistent this way, but I don't want to break anyone unknowingly."}}