public void ExpressionBuilderGeneric()
    {
        var filter = new ODataExpression <TestEntity>(x => x.ProductName == "Chai");

        filter = filter || new ODataExpression <TestEntity>(x => x.ProductID == 1);
        Assert.Equal("ProductName eq 'Chai' or ProductID eq 1", filter.AsString(_session));
    }
    public void ExpressionBuilder()
    {
        Expression <Predicate <TestEntity> >  condition1 = x => x.ProductName == "Chai";
        Expression <Func <TestEntity, bool> > condition2 = x => x.ProductID == 1;
        var filter = new ODataExpression(condition1);

        filter = filter || new ODataExpression(condition2);
        Assert.Equal("ProductName eq 'Chai' or ProductID eq 1", filter.AsString(_session));
    }
 public Task UnlinkEntryAsync(ODataExpression expression, IDictionary <string, object> linkedEntryKey, CancellationToken cancellationToken)
 {
     return(_client.UnlinkEntryAsync(_command, expression.AsString(_session), linkedEntryKey?.ToDictionary(), cancellationToken));
 }
 public Task UnlinkEntryAsync(ODataExpression expression, ODataEntry linkedEntryKey, CancellationToken cancellationToken)
 {
     return(_client.UnlinkEntryAsync(_command, expression.AsString(_session), linkedEntryKey?.ToDictionary(_session.TypeCache), cancellationToken));
 }
 public Task UnlinkEntryAsync(ODataExpression expression, CancellationToken cancellationToken)
 {
     return(_client.UnlinkEntryAsync(_command, expression.AsString(_session), null, cancellationToken));
 }
 public Task LinkEntryAsync(ODataExpression expression, ODataEntry linkedEntryKey)
 {
     return(_client.LinkEntryAsync(_command, expression.AsString(_session), linkedEntryKey.ToDictionary(_session.TypeCache), CancellationToken.None));
 }
 public Task LinkEntryAsync(ODataExpression expression, IDictionary <string, object> linkedEntryKey)
 {
     return(_client.LinkEntryAsync(_command, expression.AsString(_session), linkedEntryKey.ToDictionary(), CancellationToken.None));
 }
 public void ExpressionBuilderGeneric()
 {
     var filter = new ODataExpression<TestEntity>(x => x.ProductName == "Chai");
     filter = filter || new ODataExpression<TestEntity>(x => x.ProductID == 1);
     Assert.Equal("ProductName eq 'Chai' or ProductID eq 1", filter.AsString(_session));
 }
 public void ExpressionBuilder()
 {
     Expression<Predicate<TestEntity>> condition1 = x => x.ProductName == "Chai";
     Expression<Func<TestEntity, bool>> condition2 = x => x.ProductID == 1;
     var filter = new ODataExpression(condition1);
     filter = filter || new ODataExpression(condition2);
     Assert.Equal("ProductName eq 'Chai' or ProductID eq 1", filter.AsString(_session));
 }