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
Hello all. I'm trying to do a simple query using my test table in DynamoDB. But for any OR query I'm getting the System.NotSupportedException: 'The binary operator 'Or' is not supported'. The same applies to OrElse.
Maybe I'm missing some premise in dealing with constraints in DynamoDB or even Linq in C#.
Here's the code:
// The Entity[DynamoDBTable("TbRelacionamento")]publicclassTbRelacionamento{[DynamoDBHashKey]publicstringID{get;set;}// Some other unimportant attributes in between// In between the attributes we have Enums publicRelacionamentoFgStatusEnumFgStatus{get;set;}publicbool?Reservado{get;set;}// This is the attribute to be queried for// In between the attributes we have DateTimes publicDateTimeDataEnvioAgendamento{get;set;}// And also simple objectspublicList<ProdutoCarrinho> Produtos {get;set;}}
Here are the test that breaks with the given exception above
Generally, what I could recommend in such cases is to make two separate queries and then .Union() them.
But in your case it should be way much simpler: you just do .Where(x => x.Reservado != true) instead.
Hello all. I'm trying to do a simple query using my test table in DynamoDB. But for any OR query I'm getting the
System.NotSupportedException: 'The binary operator 'Or' is not supported'
. The same applies to OrElse.Maybe I'm missing some premise in dealing with constraints in DynamoDB or even Linq in C#.
Here's the code:
Here are the test that breaks with the given exception above
Is there anything I'm missing?
The text was updated successfully, but these errors were encountered: