Title: 2.x Upgrade Count() Issue · Issue #204 · SharpRepository/SharpRepository · GitHub
Open Graph Title: 2.x Upgrade Count() Issue · Issue #204 · SharpRepository/SharpRepository
X Title: 2.x Upgrade Count() Issue · Issue #204 · SharpRepository/SharpRepository
Description: I just tried upgrading our SharpRepository packages to 2.x and ran into an exception. I traced it down to SharpRepositoryBase.Count(ISpecification
Open Graph Description: I just tried upgrading our SharpRepository packages to 2.x and ran into an exception. I traced it down to SharpRepositoryBase.Count(ISpecification
X Description: I just tried upgrading our SharpRepository packages to 2.x and ran into an exception. I traced it down to SharpRepositoryBase.Count(ISpecification<T> criteria). Compare that Count(ISpecificat...
Opengraph URL: https://github.com/SharpRepository/SharpRepository/issues/204
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"2.x Upgrade Count() Issue","articleBody":"I just tried upgrading our SharpRepository packages to 2.x and ran into an exception.\r\n\r\nI traced it down to `SharpRepositoryBase.Count(ISpecification\u003cT\u003e criteria)`.\r\n\r\n\r\n\r\nCompare that `Count(ISpecification\u003cT\u003e criteria)` to 1.5.0.2's: https://github.com/SharpRepository/SharpRepository/blob/1.5.0.2/SharpRepository.Repository/RepositoryBase.cs#L826\r\n\r\nSo at some point all of the `Expression\u003c\u003e`s were compiled into `Func\u003c\u003e`s. I wondered why.\r\n\r\nSo, I tracked down the change in question: https://github.com/SharpRepository/SharpRepository/commit/8c1f9aaf5c23e82e91621adf8762ce6c71d620a9#diff-d24380b902ea13a619155432be3b7b18R841\r\n\r\nLooks like this was done as part of a change to handle differences in NETSTANDARD vs NETFX reflection/types. \r\n\r\nBut, in our case, broke what was working.\r\n\r\nIs that `Compile()` necessary? If not we should probably revert to the old method which doesn't throw (See below where `predicate` is the `Func\u003c\u003e`).\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/tynorton","@type":"Person","name":"tynorton"},"datePublished":"2018-05-17T09:15:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/204/SharpRepository/issues/204"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:61d2e66d-6862-9f77-bfd8-de4ac5bff8ea |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5D2:1DFAA9:12AD2AF:18068C3:69743B6E |
| html-safe-nonce | d229ce8a0f1b9d75ef2f94977692e01f11d87c239c54fd646ef3a3d3f54b4a0c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUQyOjFERkFBOToxMkFEMkFGOjE4MDY4QzM6Njk3NDNCNkUiLCJ2aXNpdG9yX2lkIjoiNDAzOTUyNjc4OTMwOTI4MzE4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8ba633b78c5951b7a32f8f5179af74a266452fd227bb77d5cf21144ab27f2af0 |
| hovercard-subject-tag | issue:323937255 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SharpRepository/SharpRepository/204/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d38fd7996e910cd04ced5aaed9de45429736973008a5ef0ec0201a5be98c4040/SharpRepository/SharpRepository/issues/204 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d38fd7996e910cd04ced5aaed9de45429736973008a5ef0ec0201a5be98c4040/SharpRepository/SharpRepository/issues/204 |
| og:image:alt | I just tried upgrading our SharpRepository packages to 2.x and ran into an exception. I traced it down to SharpRepositoryBase.Count(ISpecification |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tynorton |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| go-import | github.com/SharpRepository/SharpRepository git https://github.com/SharpRepository/SharpRepository.git |
| octolytics-dimension-user_id | 1801360 |
| octolytics-dimension-user_login | SharpRepository |
| octolytics-dimension-repository_id | 4514047 |
| octolytics-dimension-repository_nwo | SharpRepository/SharpRepository |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4514047 |
| octolytics-dimension-repository_network_root_nwo | SharpRepository/SharpRepository |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width