MailBiz.Orleans.Reminders.AdoNet
9.3.0
dotnet add package MailBiz.Orleans.Reminders.AdoNet --version 9.3.0
NuGet\Install-Package MailBiz.Orleans.Reminders.AdoNet -Version 9.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MailBiz.Orleans.Reminders.AdoNet" Version="9.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MailBiz.Orleans.Reminders.AdoNet" Version="9.3.0" />
<PackageReference Include="MailBiz.Orleans.Reminders.AdoNet" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MailBiz.Orleans.Reminders.AdoNet --version 9.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MailBiz.Orleans.Reminders.AdoNet, 9.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MailBiz.Orleans.Reminders.AdoNet@9.3.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MailBiz.Orleans.Reminders.AdoNet&version=9.3.0
#tool nuget:?package=MailBiz.Orleans.Reminders.AdoNet&version=9.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Microsoft Orleans Reminders for ADO.NET
Introduction
Microsoft Orleans Reminders for ADO.NET provides persistence for Orleans reminders using ADO.NET-compatible databases (SQL Server, MySQL, PostgreSQL, etc.). This allows your Orleans applications to schedule persistent reminders that will be triggered even after silo restarts or grain deactivation.
Getting Started
To use this package, install it via NuGet:
dotnet add package Microsoft.Orleans.Reminders.AdoNet
You will also need to install the appropriate ADO.NET provider for your database:
# For SQL Server
dotnet add package System.Data.SqlClient
# For MySQL
dotnet add package MySql.Data
# For PostgreSQL
dotnet add package Npgsql
Example - Configuring ADO.NET Reminders
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Configuration;
using Orleans.Hosting;
using Example;
// Create a host builder
var builder = Host.CreateApplicationBuilder(args);
builder.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure ADO.NET as reminder storage
.UseAdoNetReminderService(options =>
{
options.Invariant = "System.Data.SqlClient"; // For SQL Server
options.ConnectionString = "Server=localhost;Database=OrleansReminders;User ID=orleans;******;";
});
});
// Build and start the host
var host = builder.Build();
await host.StartAsync();
// Get a grain reference and use it
var grain = host.Services.GetRequiredService<IGrainFactory>().GetGrain<IReminderGrain>("my-reminder-grain");
await grain.StartReminder("DailyReport");
Console.WriteLine("Reminder started successfully!");
// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();
Example - Using Reminders in a Grain
using System;
using System.Threading.Tasks;
using Orleans;
using Orleans.Runtime;
namespace Example;
public interface IReminderGrain : IGrainWithStringKey
{
Task StartReminder(string reminderName);
Task StopReminder();
}
public class ReminderGrain : Grain, IReminderGrain, IRemindable
{
private string _reminderName = "MyReminder";
public async Task StartReminder(string reminderName)
{
_reminderName = reminderName;
// Register a persistent reminder
await RegisterOrUpdateReminder(
reminderName,
TimeSpan.FromMinutes(2), // Time to delay before the first tick (must be > 1 minute)
TimeSpan.FromMinutes(5)); // Period of the reminder (must be > 1 minute)
}
public async Task StopReminder()
{
// Find and unregister the reminder
var reminder = await GetReminder(_reminderName);
if (reminder != null)
{
await UnregisterReminder(reminder);
}
}
public Task ReceiveReminder(string reminderName, TickStatus status)
{
// This method is called when the reminder ticks
Console.WriteLine($"Reminder {reminderName} triggered at {DateTime.UtcNow}. Status: {status}");
return Task.CompletedTask;
}
}
Documentation
For more comprehensive documentation, please refer to:
Feedback & Contributing
- If you have any issues or would like to provide feedback, please open an issue on GitHub
- Join our community on Discord
- Follow the @msftorleans Twitter account for Orleans announcements
- Contributions are welcome! Please review our contribution guidelines
- This project is licensed under the MIT license
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- MailBiz.Orleans.Reminders (>= 9.3.0)
- Microsoft.AspNetCore.Connections.Abstractions (>= 8.0.11)
- Microsoft.CodeAnalysis.Analyzers (>= 3.11.0)
- Microsoft.CodeAnalysis.Common (>= 4.5.0)
- Microsoft.CodeAnalysis.Workspaces.Common (>= 4.5.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.DependencyModel (>= 8.0.2)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- Microsoft.Extensions.Logging.Console (>= 8.0.1)
- Microsoft.Extensions.Logging.Debug (>= 8.0.1)
- Microsoft.Extensions.ObjectPool (>= 8.0.11)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Orleans.Analyzers (>= 9.3.0)
- Microsoft.Orleans.CodeGenerator (>= 9.3.0)
- Microsoft.Orleans.Runtime (>= 9.3.0)
- Newtonsoft.Json (>= 13.0.3)
- System.Collections.Immutable (>= 8.0.0)
- System.IO.Hashing (>= 8.0.0)
- System.IO.Pipelines (>= 8.0.0)
- System.Memory.Data (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.3.0 | 317 | 11/17/2025 |