Cosmos: translate indexing into collection
_ = await ctx.Blogs.Where(b => b.Posts[2].Name == "foo").ToListAsync();
Note that since we support primitive collections, this should translate on those too.
Related: https://github.com/dotnet/efcore/issues/16926
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
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.
Note from triage: also consider other issues related to primitive collections--see label area-primitive-collections.