Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test verifying #15208 #16344

Merged
merged 1 commit into from
Jun 28, 2019
Merged

Add test verifying #15208 #16344

merged 1 commit into from
Jun 28, 2019

Conversation

roji
Copy link
Member

@roji roji commented Jun 28, 2019

DateTimeOffset and Contains()

Fixes #15208

Copy link
Contributor

@smitpatel smitpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use DateTimeOffset column in GearsOfWar model

@roji roji requested a review from smitpatel June 28, 2019 20:54
@roji
Copy link
Member Author

roji commented Jun 28, 2019

@smitpatel this test triggers InvalidOperationException on Sqlite only (guess you were right about the importance of coverage outside of SqlServer...):

System.InvalidOperationException : Operation is not valid due to the current state of the object.
   at Microsoft.EntityFrameworkCore.Relational.Query.Pipeline.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateWhere(ShapedQueryExpression source, LambdaExpression predicate) in /home/roji/projects/EFCore/src/EFCore.Relational/Query/Pipeline/RelationalQueryableMethodTranslatingExpressionVisitor.cs:line 814
   at Microsoft.EntityFrameworkCore.Query.Pipeline.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) in /home/roji/projects/EFCore/src/EFCore/Query/Pipeline/QueryableMethodTranslatingExpressionVisitor.cs:line 425
   at Microsoft.EntityFrameworkCore.Relational.Query.Pipeline.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) in /home/roji/projects/EFCore/src/EFCore.Relational/Query/Pipeline/RelationalQueryableMethodTranslatingExpressionVisitor.cs:line 61
   at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.EntityFrameworkCore.Query.Pipeline.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) in /home/roji/projects/EFCore/src/EFCore/Query/Pipeline/QueryCompilationContext.cs:line 58
   at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) in /home/roji/projects/EFCore/src/EFCore/Storage/Database.cs:line 72
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) in /home/roji/projects/EFCore/src/EFCore/Query/Internal/QueryCompiler.cs:line 108
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.<Execute>b__0() in /home/roji/projects/EFCore/src/EFCore/Query/Internal/QueryCompiler.cs:line 97

I can try to take a look unless you want to.

@smitpatel
Copy link
Contributor

DateTimeOffset comparison is client eval on Sqlite.

DateTimeOffset and Contains()

Fixes #15208
@roji roji merged commit 34925ca into master Jun 28, 2019
@ghost ghost deleted the Bug15208 branch June 28, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cast datetimeoffet to date then check if in list of dates in linq/c#
2 participants