File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ That's all the code needed! Which we can now call using the ideal route:
5959and because it's a just regular Request DTO, we also get an end-to-end typed API for free with:
6060
6161``` csharp
62- var movies = client .Get (new FindMovies { Ratings = new []{" G" ," PG-13" } })
62+ var movies = client .Get (new FindMovies {
63+ Ratings = [" G" ," PG-13" ]
64+ })
6365```
6466
6567Whilst that gives us the ideal API we want , the minimum code required is to just declare a new Request DTO with the table you wish to query :
@@ -858,15 +860,15 @@ With the richer semantics available in queries, we've been able to enhance the S
858860
859861```csharp
860862var results = client .GetLazy (new QueryMovies {
861- Ratings = new []{ " G" ," PG-13" }
863+ Ratings = [ " G" ," PG-13" ]
862864}).ToList ();
863865```
864866
865867Since GetLazy returns a lazy `IEnumerable < T > ` sequence it can also be used within LINQ expressions , e .g :
866868
867869```csharp
868870var top250 = client .GetLazy (new QueryMovies {
869- Ratings = new []{ " G" , " PG-13" }
871+ Ratings = [ " G" ," PG-13" ]
870872 })
871873 .Take (250 )
872874 .ConvertTo (x => x .Title );
You can’t perform that action at this time.
0 commit comments