Sure, here's an example of how you can organize your middleware in the Startup.cs
file of a .NET Core application:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else