Posts Categorized: SQL Server

Selectively Running Database Project Post Deploy SQL Scripts using SQLCMD

Posted by & filed under Development, Microsoft, SQL Server, TFS.

We’ve been playing with our TFS builds recently now have a system in place where our nightly build will drop and recreate the project’s databases based on the schemas in the database projects. As part of the publish, MSBuild will generate a script file containing either the entire schema (nightly build) or any schema changes […]

nHibernate Replace Column Value

Posted by & filed under nHibernate, SQL Server.

As I’ve been learning nHibernate there have been certain queries that I’ve been struggling to replicate in nHibernate and google has not been my friend. One of those queries was trying to replicate the replace sql function so that I could strip out spaces from a postcode for comparison search, but after searching and tweaking […]

nHibernate “not in” join table query

Posted by & filed under nHibernate, SQL Server.

I’ve recently been working on a project where it was a client’s requirement that we use nHibernate as the data access layer. Although I wasn’t keen at first, I actually quite like the control you have over the domain model. It also worked extremely well with WCF contracts, simply by adding DataMember decoration to the […]