Marvee Amasi
Marvee Amasi
DIIDevHeads IoT Integration Server
Created by Marvee Amasi on 6/7/2024 in #middleware-and-os
Is there any difference between the { e.MapControllers(); } and the e.MapControllers() ?
@Enthernet Code Oh yh Calling e.MapControllers() twice would indeed be redundant. In my example, I accidentally included it when invoking both UseEndpoints.
public void Configure(IApplicationBuilder app)
{
... //my other codes
app.UseEndpoints(e=>
{
e.MapControllers();
});
}
public void Configure(IApplicationBuilder app)
{
... //my other codes
app.UseEndpoints(e=>
{
e.MapControllers();
});
}
5 replies