Feb 02 2026
This issue is self-sponsored. By supporting my work and purchasing my products, you directly help me keep this newsletter free and continue creating high-quality, practical .NET content for the community.
Thank you for the support 🙌
P.S. I’m currently building a new course, Pragmatic .NET Code Rules, focused on creating a predictable, consistent, and self-maintaining .NET codebase using .editorconfig, analyzers, Visual Studio code cleanup, and CI enforcement.
The course is available for pre-sale until the official release, with early-bird pricing for early adopters. You can find all the details here.
Coravel is a lightweight open-source library that adds background job scheduling, queuing, caching, mailing, and event broadcasting to your .NET apps - all without requiring a separate infrastructure.
If you've ever wanted to schedule background jobs, queue tasks, send emails, or cache data in your .NET applications without the complexity of setting up external services like Hangfire, Redis, or Quartz.NET - Coravel is your answer.
Inspired by Laravel (PHP), Coravel brings elegant syntax and powerful background features to .NET with zero configuration. It's the perfect tool for developers who want simplicity without sacrificing power.
• No database or message broker required • Perfect for small to medium apps • Fully integrates with ASP.NET Core dependency injection • Clean and readable syntax Let's see what you can do with Coravel.
You can run jobs like cleaning logs, syncing files, or sending emails on a schedule with Coravel's scheduler. Create job:
public class SendDailyReportsEmailJob : IInvocable{ public Task Invoke() { Console.WriteLine("Sending daily report email..."); return Task.CompletedTask; }}
Register it:
builder.Services.AddScheduler();builder.Services.AddTransient<SendDailyReportsEmailJob>();
Schedule it:
app.Services.UseScheduler(scheduler =>{ scheduler .Schedule<SendDailyReportsEmailJob>() .DailyAtHour(6); // Every day at 6 AM});
You can also use: • .Hourly() • .EveryMinute() • .Weekly() • .Cron("/5 *") for advanced control
You can avoid blocking the main thread for tasks like sending emails or processing files. Create an Invocable Job:
public class ProcessWebhook : IInvocable{ public Task Invoke() { Console.WriteLine("Webhook processed in background."); return Task.CompletedTask; }}
Queue it:
var dispatcher = app.Services.GetService<IDispatcher>();await dispatcher.EnqueueAsync<ProcessWebhook>();
In-memory only: jobs are lost if the app restarts. Ideal for non-critical tasks.
Coravel's event system enables decoupled communication between services in the same app. Define an Event:
public record OrderPlacedEvent(int OrderId);
Create a Listener:
public class SendThankYouEmail : IListener<OrderPlacedEvent>{ public Task HandleAsync(OrderPlacedEvent e) { Console.WriteLine($"Thank you email sent for order {e.OrderId}."); return Task.CompletedTask; }}
Use it:
await eventDispatcher.BroadcastAsync(new OrderPlacedEvent(123));
Send beautiful, templated emails using Razor views. Define a Mailable:
public class WelcomeMailable : Mailable<User>{ public override void Build() { To(Model.Email) .Subject("Welcome to our platform!") .View("Emails.Welcome", Model); }}
Send it:
await mailer.SendAsync(new WelcomeMailable(user));
Supports view rendering from Razor Class Libraries or .cshtml files.
Send beautiful, templated emails using Razor views. Define a Mailable:
public class WelcomeMailable : Mailable<User>{ public override void Build() { To(Model.Email) .Subject("Welcome to our platform!") .View("Emails.Welcome", Model); }}
Send it:
await mailer.SendAsync(new WelcomeMailable(user));
Supports view rendering from Razor Class Libraries or .cshtml files.
Built-in memory caching to store frequently used data. Store and Retrieve from Cache:
var data = cache.GetOrAdd("top-products", () =>{ return FetchTopProducts();}, TimeSpan.FromMinutes(15));
No extra configuration or Redis needed.
Imagine an internal admin dashboard for a SaaS platform. You want to:
• Send a daily email with usage reports to the admin • Cache report data for 30 minutes • Queue email sending in background • Use events when reports are generated
With Coravel: Store and Retrieve from Cache:
public class GenerateAndSendReportJob : IInvocable{ private readonly ICache _cache; private readonly IMailer _mailer; public GenerateAndSendReportJob(ICache cache, IMailer mailer) { _cache = cache; _mailer = mailer; } public async Task Invoke() { var report = _cache.GetOrAdd("daily-report", () => GenerateReport(), TimeSpan.FromMinutes(30)); await _mailer.SendAsync(new ReportMailable(report)); }}
Schedule it:
scheduler.Schedule<GenerateAndSendReportJob>() .DailyAtHour(8);
For heavier workloads, see Background Jobs with Hangfire. For built-in solutions, check Background Tasks in .NET 8.
Coravel proves that powerful background tasking in .NET doesn't need to be complex.
It lets you focus on business logic instead of infrastructure, giving you everything you need to build responsive and maintainable apps - fast.
Whether you're building an admin dashboard, a SaaS backend, or a microservice with lightweight needs, Coravel is a sharp and elegant tool to keep in your arsenal.
You can add it through NuGet. Here is the Coravel repo.
That's all from me today.
P.S. Follow me on YouTube.
Stop arguing about code style. In this course you get a production-proven setup with analyzers, CI quality gates, and architecture tests — the exact system I use in real projects. Join here.
Not sure yet? Grab the free Starter Kit — a drop-in setup with the essentials from Module 01.
Design Patterns that Deliver — Solve real problems with 5 battle-tested patterns (Builder, Decorator, Strategy, Adapter, Mediator) using practical, real-world examples. Trusted by 650+ developers.
Just getting started? Design Patterns Simplified covers 10 essential patterns in a beginner-friendly, 30-page guide for just $9.95.
Every Monday morning, I share 1 actionable tip on C#, .NET & Architecture that you can use right away. Join here.
Join 20,000+ subscribers who mass-improve their .NET skills with actionable tips on C#, Architecture & Best Practices.
Subscribe to the TheCodeMan.net and be among the 20,000+ subscribers gaining practical tips and resources to enhance your .NET expertise.