You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var utcNow = DateTime.UtcNow;
var newRecord = new TestRecord
{
ByMinutePartition = StripToMinutes(utcNow),
ExactTime = utcNow,
Id = Guid.NewGuid()
};
table.InsertOnSubmit(newRecord);
l2dd.SubmitChanges();
var e = table.FirstOrDefault(record => record.ByMinutePartition >= newRecord.ByMinutePartition.AddMinutes(-1) && record.ByMinutePartition <= record.ByMinutePartition.AddMinutes(1));
ByMinutePartition field is of type DateTime. StripToMinutes simply Subtracts Seconds and Milliseconds from DateTime.
Expected it to be transformed into valid scan request with +-1 minute boundaries, but instead got exception:
Version: 1.4.0
An unhandled exception of type 'System.NotSupportedException' occurred in Linq2DynamoDb.DataContext.dll
Additional information: The method 'AddMinutes' is not supported
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 148
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitBinary(BinaryExpression binaryExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 113
at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitBinary(BinaryExpression binaryExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 113
at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitWhereCall(Expression whereBodyExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 35
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 88
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodArgs(ReadOnlyCollection1 original) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 123 at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 78 at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Linq2DynamoDb.DataContext.QueryProvider.ExecuteQuery(Expression expression) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\QueryProvider.cs:line 55 at Linq2DynamoDb.DataContext.QueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\QueryProvider.cs:line 107 at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1 source, Expression`1 predicate)
at DynamoDbTimeoutStorageTest.Program.Main(String[] args) in c:\Users\Umnov\Documents\Visual Studio 2013\Projects\DynamoDbTimeoutStorageTest\DynamoDbTimeoutStorageTest\Program.cs:line 45
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The text was updated successfully, but these errors were encountered:
var table = l2dd.GetTable();
var utcNow = DateTime.UtcNow;
var newRecord = new TestRecord
{
ByMinutePartition = StripToMinutes(utcNow),
ExactTime = utcNow,
Id = Guid.NewGuid()
};
table.InsertOnSubmit(newRecord);
l2dd.SubmitChanges();
var e = table.FirstOrDefault(record => record.ByMinutePartition >= newRecord.ByMinutePartition.AddMinutes(-1) && record.ByMinutePartition <= record.ByMinutePartition.AddMinutes(1));
ByMinutePartition field is of type DateTime. StripToMinutes simply Subtracts Seconds and Milliseconds from DateTime.
Expected it to be transformed into valid scan request with +-1 minute boundaries, but instead got exception:
Version: 1.4.0
An unhandled exception of type 'System.NotSupportedException' occurred in Linq2DynamoDb.DataContext.dll
Additional information: The method 'AddMinutes' is not supported
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 148
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitBinary(BinaryExpression binaryExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 113
at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.WhereVisitor.VisitBinary(BinaryExpression binaryExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\WhereVisitor.cs:line 113
at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitWhereCall(Expression whereBodyExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 35
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 88
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodArgs(ReadOnlyCollection
1 original) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 123 at Linq2DynamoDb.DataContext.ExpressionUtils.QueryableMethodsVisitor.VisitMethodCall(MethodCallExpression methodCallExp) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\ExpressionUtils\QueryableMethodsVisitor.cs:line 78 at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Linq2DynamoDb.DataContext.QueryProvider.ExecuteQuery(Expression expression) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\QueryProvider.cs:line 55 at Linq2DynamoDb.DataContext.QueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression) in c:\Konst\projects\LINQ2DynamoDB\Sources\Linq2DynamoDb.DataContext\QueryProvider.cs:line 107 at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable
1 source, Expression`1 predicate)at DynamoDbTimeoutStorageTest.Program.Main(String[] args) in c:\Users\Umnov\Documents\Visual Studio 2013\Projects\DynamoDbTimeoutStorageTest\DynamoDbTimeoutStorageTest\Program.cs:line 45
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The text was updated successfully, but these errors were encountered: