{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/8488","repository_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore","labels_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/8488/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/8488/comments","events_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/8488/events","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/8488","id":229145536,"node_id":"MDU6SXNzdWUyMjkxNDU1MzY=","number":8488,"title":"isdate() Sql Function","user":{"login":"myblindy","id":541998,"node_id":"MDQ6VXNlcjU0MTk5OA==","avatar_url":"https://avatars3.githubusercontent.com/u/541998?v=4","gravatar_id":"","url":"https://api.github.com/users/myblindy","html_url":"https://github.com/myblindy","followers_url":"https://api.github.com/users/myblindy/followers","following_url":"https://api.github.com/users/myblindy/following{/other_user}","gists_url":"https://api.github.com/users/myblindy/gists{/gist_id}","starred_url":"https://api.github.com/users/myblindy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myblindy/subscriptions","organizations_url":"https://api.github.com/users/myblindy/orgs","repos_url":"https://api.github.com/users/myblindy/repos","events_url":"https://api.github.com/users/myblindy/events{/privacy}","received_events_url":"https://api.github.com/users/myblindy/received_events","type":"User","site_admin":false},"labels":[{"id":76481854,"node_id":"MDU6TGFiZWw3NjQ4MTg1NA==","url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/labels/type-enhancement","name":"type-enhancement","color":"bfe5bf","default":false},{"id":178029136,"node_id":"MDU6TGFiZWwxNzgwMjkxMzY=","url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/labels/up-for-grabs","name":"up-for-grabs","color":"0070FF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/milestones/2","html_url":"https://github.com/aspnet/EntityFrameworkCore/milestone/2","labels_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/milestones/2/labels","id":648040,"node_id":"MDk6TWlsZXN0b25lNjQ4MDQw","number":2,"title":"Backlog","description":"Issues that have been approved but are not scheduled a specific release.","creator":{"login":"bricelam","id":1226749,"node_id":"MDQ6VXNlcjEyMjY3NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/1226749?v=4","gravatar_id":"","url":"https://api.github.com/users/bricelam","html_url":"https://github.com/bricelam","followers_url":"https://api.github.com/users/bricelam/followers","following_url":"https://api.github.com/users/bricelam/following{/other_user}","gists_url":"https://api.github.com/users/bricelam/gists{/gist_id}","starred_url":"https://api.github.com/users/bricelam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricelam/subscriptions","organizations_url":"https://api.github.com/users/bricelam/orgs","repos_url":"https://api.github.com/users/bricelam/repos","events_url":"https://api.github.com/users/bricelam/events{/privacy}","received_events_url":"https://api.github.com/users/bricelam/received_events","type":"User","site_admin":false},"open_issues":599,"closed_issues":0,"state":"open","created_at":"2014-05-03T18:58:28Z","updated_at":"2018-10-29T21:28:31Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2017-05-16T19:36:05Z","updated_at":"2018-10-30T05:42:51Z","closed_at":null,"author_association":"NONE","body":"I need the sql `isdate()` function in relation to short-circuiting certain further conditions. Something like (obviously not working code):\r\n\r\n    var mydate = new DateTime(2017, 1, 15);\r\n    var query = context.Table.Where(w => DateTime.IsDate(w.DateField) && Convert.ToDateTime(w.DateField) > mydate);\r\n\r\nWhere DateTime.IsDate could be an extension method used only for compiling EF queries (though a full implementation would be useful throughout the framework, no idea why it was never implemented). The query generated should look like:\r\n  \r\n    select *\r\n    from table\r\n    where isdate(datefield) = 1 and convert(datetime, datefield) > @mydateparam\r\n\r\nSince the database I'm provided has dates stored as strings (and not all valid), I'm kind of stuck on this. I have no other way of testing against dates if I can't first test if a date is valid.\r\n\r\n\r\n### Further technical details\r\nEF Core version: 2 Preview, though the exact version shouldn't matter\r\nDatabase Provider: Microsoft.EntityFrameworkCore.SqlServer"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/comments/434178978","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/8488#issuecomment-434178978","issue_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/8488","id":434178978,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDE3ODk3OA==","user":{"login":"divega","id":1253414,"node_id":"MDQ6VXNlcjEyNTM0MTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1253414?v=4","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T05:42:51Z","updated_at":"2018-10-30T05:42:51Z","author_association":"MEMBER","body":"@ralmsdeveloper Nevertheless, having this readily available in EF.Functions would be nice. The same applies to any database built-in functions that don’t duplicate functionality already available on common BCL methods. \r\n\r\nWe haven’t been more proactive about doing this because we have other things that are important and because we wanted to hear what customers wanted. But this issue is an instance of that."}}
{"actor":{"display_login":"divega"}}