Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Builds, reviews, and migrates .NET Azure Functions to the isolated worker model, covering bindings, DI, and Durable Functions.
95% 100%+5 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
3 of 3 safety checks passed
// Program.cs - Register services with appropriate lifetimes
var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
.ConfigureServices(services =>
{
// Singleton - shared across all function invocations
services.AddSingleton<ICacheService, RedisCacheService>();
// Scoped - one instance per function invocation
services.AddScoped<IUnitOfWork, UnitOfWork>();
// Transient - new instance each time requested
services.AddTransient<IEmailBuilder, EmailBuilder>();
// Options pattern for configuration
services.Configure<StorageOptions>(
hostContext.Configuration.GetSection("Storage"));
})
.Build();
// Full middleware pipeline setup
var host = new HostBuilder()
.ConfigureFunctionsWebApplication(builder =>
{
// Order matters - executed in registration order
builder.UseMiddleware<ExceptionHandlingMiddleware>();
builder.UseMiddleware<RequestLoggingMiddleware>();
builder.UseMiddleware<AuthenticationMiddleware>();
builder.UseMiddleware<CorrelationIdMiddleware>();
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.