- When writing .NET code to access a SQL database we often rely on the Entity Framework (EF). The EF makes it very easy to retrieve data from the database by generating a SQL Query for us. But we should not trust it blindly, as the EF can also generate a bad query. It will return the correct data yes, but at what performance cost?Filtering on a tinyint with Entity Framework