#Entity-Framework
5 notas · última:
Preventing SQL injection in C# with Entity Framework
The page explains how SQL injection happens, why string concatenation is risky, and how Entity Framework reduces that risk with LINQ, FromSqlInterpolated, and explicit parameters in FromSqlRaw.
3 Essential Techniques for Managing Transactions in EF Core
Compares three ways to wrap EF Core writes in a transaction: automatic per-call, manual begin/commit/rollback, and execution-strategy transactions that retry on transient failure.
Implementing & Testing Repository Pattern using Entity Framework
The article explains why Repository Pattern can still help with Entity Framework by reducing duplicate query logic, separating persistence concerns, and making business logic easier to unit test through mocking.
Clean Architecture With .NET 6 Using Entity Framework
The article shows how to add Entity Framework to a .NET 6 clean architecture solution, define an AppSetting entity, wire an application DB context through dependency injection, and create the database with migrations.
Large Model Problems Continue to Plague Entity Framework, NHibernate
The page says Entity Framework gets much slower as EDMX models grow, and that NHibernate shows similar slowdowns when change tracking and relationships are involved. AsNoTracking is mentioned as a workaround with limits.
