[QUERY] Recommendations to replace IQueryable functionality?
See original GitHub issueQuery/Question I’m looking at upgrading from older versions of the SDK, but I see that this version doesn’t include IQueryable support. That’s fine for simple queries, but I have a number of places in my code where we have something to the effect of:
var query = CreateQuery<MyEntity>();
query = query.Where(e => e.PartitionKey == "whatever");
if (startDate.HasValue)
{
query = query.Where(e => e.CreatedDate >= startDate.Value);
}
if (endDate.HasValue)
{
query = query.Where(e => e.CreatedDate <= endDate.Value);
}
var result = await query.ExecuteSegmentedAsync();
If I understand the new library correctly, the only way I could replicate this kind of code is to build the OData strings myself. Is there a better way to handle this? Would you consider including some kind of query builder, even if it’s not based on IQueryable?
Environment:
- Name and version of the Library package used: Azure.Data.Tables 12.2.0
- Hosting platform or OS and .NET runtime version (
dotnet --info
output for .NET Core projects): Azure Cloud Services, .NET Framework 4.7.2 - IDE and version : Visual Studio
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Replace specific Objects in IQueryable query in .NET fails
Therefore, if you only replace some elements from query1 with elements from query2, then the result is of course also an IQueryable<TSource> ...
Read more >8 Tips and Tricks for Writing the Best Queries in LINQ to ...
Pull only the needed columns; Use of IQueryable and Skip/Take; Use of left join and inner join at the right places; Use of...
Read more >What to Return from Repositories: IQueryable, IEnumerable or ...
When it comes to implementing get methods in repositories which should return a collection of domain objects (GetUsers, GetProducts, ...
Read more >Explain IEnumerable and IQueryable and how EF query works
Learn about how queries work behind the scene, and the difference between IEnumerable and IQueryable.
Read more >IQueryable Interface (System.Linq)
Provides functionality to evaluate queries against a specific data source wherein the type of the data is not specified.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, this is exactly the info I needed!
Hi @misholson, since you haven’t asked that we “
/unresolve
” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve
” to reopen the issue.