IConfiguration vs IOptions NET
Synchronous and Asynchronous in .NET Core
Model Binding and Validation in ASP.NET Core
ControllerBase vs Controller in ASP.NET Core
ConfigureServices and Configure methods
IHostedService interface in .NET Core
ASP.NET Core request processing
| Database Migrations and Seeding | Scaffolding-in-EF-Core | |
β‘ Connection Pooling and Performance Tuning in .NET Core |
Connection Pooling is a technique where database connections are reused instead of being created and destroyed for each request. This reduces overhead and improves performance in high-traffic applications.
Connection pooling is enabled by default in ADO.NET and EF Core. You can configure it in the connection string:
"ConnectionStrings": {
"DefaultConnection":
"Server=.;Database=ShopDb;Trusted_Connection=True;
Max Pool Size=100;Min Pool Size=5;Connect Timeout=30;"
}
services.AddDbContextPool<AppDbContext>().using or DI scope).Connection pooling and performance tuning are essential for building scalable .NET Core applications. Use EF Core features like DbContext pooling, AsNoTracking, compiled queries, and batching along with proper database indexing and monitoring to achieve optimal performance.
| Database Migrations and Seeding | Scaffolding-in-EF-Core | |