Skip to content

Commit 9b10532

Browse files
author
Jeff Treuting
committed
Fix for querying
1 parent e371013 commit 9b10532

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

SharpRepository.ODataRepository/Linq/QueryGeneration/ODataApiGeneratorExpressionTreeVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected override Expression VisitBinaryExpression (BinaryExpression expression
117117
protected override Expression VisitMemberExpression (MemberExpression expression)
118118
{
119119
VisitExpression (expression.Expression);
120-
_expression.AppendFormat(".{0}", expression.Member.Name);
120+
_expression.AppendFormat("{0}", expression.Member.Name);
121121

122122
return expression;
123123
}

SharpRepository.Tests.Integration/Spikes/ODataSpikes.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,27 @@ public void NetflixTest()
1616

1717
results.Count().ShouldEqual(326);
1818
}
19+
20+
[Test]
21+
public void NetflixFindAllTest()
22+
{
23+
var repository = new ODataRepository<Title>("http://odata.netflix.com/v2/Catalog");
24+
var results = repository.FindAll(x => x.ReleaseYear == 1991);
25+
26+
results.Count().ShouldEqual(326);
27+
}
1928
}
2029

2130
public class Genre
2231
{
2332
public string Name { get; set; }
2433
}
34+
35+
public class Title
36+
{
37+
public string Id { get; set; }
38+
public string ShortName { get; set; }
39+
public int ReleaseYear { get; set; }
40+
public string Rating { get; set; }
41+
}
2542
}

0 commit comments

Comments
 (0)