Bot releases are hidden (Show)
Published by mumby0168 almost 3 years ago
Full Changelog: https://github.com/IEvangelist/azure-cosmos-dotnet-repository/compare/2.5.3...2.6.0
Published by mumby0168 almost 3 years ago
Full Changelog: https://github.com/IEvangelist/azure-cosmos-dotnet-repository/compare/2.5.2...2.5.3
Published by IEvangelist almost 3 years ago
Published by IEvangelist about 3 years ago
This release fixed a bug, where the usage of managed identities were not functioning correctly.
Published by mumby0168 about 3 years ago
This release has focused on the configuration of the containers that the library creates for you, this library now offers more options in terms of throughput for a container, time to live at a container level and it can also apply updates via container syncing if you opt into it or you can call this manually yourself.
This release also adds a new API to the IRepository<TItem>
implementation to see if an item exists or not based on its id or a predicate.
See the milestone here https://github.com/IEvangelist/azure-cosmos-dotnet-repository/milestone/1
Here are a few locations where the samples have been updated to demonstrate the new APIs
Container Syncing is an opt-in feature and can have some performance impacts the first time your app starts up and makes a request to a given container as it will need to make sure the settings match what you have in your application. You can opt into this on a per-container basis or opt all containers in via the global setting which lives on the
RepositoryOptions
class. There is also a new service publicly available if you want to be in control of when to perform this container sync yourself the interface is namedICosmosContainerSyncService
class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder) =>
builder.Services.AddCosmosRepository(options =>
{
options.ContainerPerItemType = true;
options.ContainerBuilder.Configure<User>(containerOptions => containerOptions
.WithContainer("users")
.WithPartitionKey("/emailAddress")
.WithContainerDefaultTimeToLive(TimeSpan.FromMinutes(1))
.WithManualThroughput(500)
.WithSyncableContainerProperties()
);
});
}
await _personRepository.ExistsAsync(person.Id);
await _dogRepository.ExistsAsync(d => d.Breed == "cocker spaniel" || d.Id == dog3.Id);
await _syncService.SyncContainerPropertiesAsync<TestItem>();
Published by mumby0168 about 3 years ago
This release has been the first release since a new set of maintainers have started working on the project. It has added an extra set of options for configuration as an alternative to use the attributes already provided & includes an in memory running option which can be great for running integration tests or just doing some little demos.
We have a few sample project within this repository below are some links to the where the new features are used.
public override void Configure(IFunctionsHostBuilder builder) =>
builder.Services.AddCosmosRepository(options =>
{
options.ContainerPerItemType = true;
options.ContainerBuilder.Configure<User>(containerOptions => containerOptions
.WithContainer("users")
.WithPartitionKey("/emailAddress")
);
});
services.AddInMemoryCosmosRepository();