Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos: translate indexing into collection #25701

Closed
Tracked by #30731 ...
roji opened this issue Aug 25, 2021 · 4 comments · Fixed by #33998
Closed
Tracked by #30731 ...

Cosmos: translate indexing into collection #25701

roji opened this issue Aug 25, 2021 · 4 comments · Fixed by #33998
Assignees
Labels
area-cosmos area-primitive-collections area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Aug 25, 2021

_ = await ctx.Blogs.Where(b => b.Posts[2].Name == "foo").ToListAsync();

Note that since we support primitive collections, this should translate on those too.

@AndriySvyryd
Copy link
Member

Related: #16926

@dalokey
Copy link

dalokey commented Mar 29, 2022

Really love this package, but without this key feature (and other array functionality), I am very limited and will just have to go back to using the SDK for now

@dalokey
Copy link

dalokey commented Mar 30, 2022

Really love this package, but without this key feature (and other array functionality), I am very limited and will just have to go back to using the SDK for now

So because I really enjoy using this package, I wouldn't/couldn't go back to just using the SDK lol. Anyway, I kind of went my own way (and wouldn't expect this to be the best approach) to allow me to switch between EF and the SDK (until all the features I require are available on EF).

I realised that EF comes with a Database property that has already set the connection using EF's services.AddDbContextFactory().

So I managed to allow the context to give me a container (without having to do as much work as I would ever do using the SDK) by adding a public property on the defined DbContext class that has a singleton getter (no setter) to get the container :)

Database.GetCosmosClient().GetContainer("dbName", "containerName");

This would mostly likely be used for complex queries, not having any issues with commands atm.

Would love to not have to go this way, but I don't want to write SQL code to get around this.

@ajcvickers ajcvickers added punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. and removed propose-punt labels Jul 7, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, Backlog Jul 7, 2022
@smitpatel smitpatel removed their assignment Sep 14, 2022
@ajcvickers
Copy link
Member

Note from triage: also consider other issues related to primitive collections--see label area-primitive-collections.

@roji roji assigned roji and unassigned maumar May 17, 2024
@roji roji removed this from the Backlog milestone Jun 4, 2024
@roji roji added this to the 9.0.0 milestone Jun 4, 2024
@roji roji added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels Jun 4, 2024
roji added a commit to roji/efcore that referenced this issue Jun 4, 2024
Implements dotnet#25701 for primitive collections
Implements dotnet#25700 for primitive collections
Largely implements dotnet#25765
Fixes dotnet#33858
roji added a commit that referenced this issue Jun 5, 2024
#33895)

Implements #25701 for primitive collections
Implements #25700 for primitive collections
Largely implements #25765
Fixes #33858
roji added a commit to roji/efcore that referenced this issue Jun 8, 2024
roji added a commit to roji/efcore that referenced this issue Jun 8, 2024
roji added a commit to roji/efcore that referenced this issue Jun 11, 2024
roji added a commit that referenced this issue Jun 11, 2024
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 15, 2024
roji added a commit to roji/efcore that referenced this issue Jun 15, 2024
roji added a commit to roji/efcore that referenced this issue Jun 15, 2024
roji added a commit to roji/efcore that referenced this issue Jun 15, 2024
roji added a commit to roji/efcore that referenced this issue Jun 15, 2024
@roji roji closed this as completed in 531c238 Jun 20, 2024
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-preview6 Jun 21, 2024
@roji roji modified the milestones: 9.0.0-preview6, 9.0.0 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cosmos area-primitive-collections area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. punted-for-7.0 Originally planned for the EF Core 7.0 (EF7) release, but moved out due to resource constraints. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants