Contents tagged with SQL
-
Entity Framework Pitfalls: Null Semantics
Imagine you have a simple class:
-
SQL Server Auditing
Probably the best mechanism for auditing changes to tables in SQL Server is Change Data Capture, which I already covered here. Unfortunately, it only works with the Enterprise editions of SQL Server, something that not everyone has access to.
-
Getting the SQL for HQL and Criteria Queries
OK, so, I already showed how we can get the SQL that was generated from a LINQ query. Of course, we can do the same for both HQL and Criteria APIs as well (QueryOver is just a wrapper around Criteria, mind you).
-
Lesser-Known NHibernate Features – Generating Database Scripts
As you may know, NHibernate knows how to generate the database for you from its model. Any of the supported databases will do.
-
Getting the SQL from a LINQ Query in NHibernate
In case you ever want to have a look at the generated SQL before it is actually executed, you can use this extension method:
-
Getting the Topmost Hierarchical Parent in T-SQL
It is normal in databases to have hierarchical tables, that is, tables that are related with themselves, forming a parent-child relation. For example, consider this:
-
Entity Framework Pitfalls: Cannot Return Complex Types From SQL Queries
Clarified: thanks, Diego!