Row number in a Sql query
This is a simple way to create row numbering in a sql query, but with bad performance (SELECT COUNT(*) FROM YourTable T1 WHERE T1.RankOrder < T.RankOrder) AS Rank Better use rank() or row_number()...
View ArticleRecreating lost Umbraco Data
Just had one of the rare occations when Umbraco data does something really unexpected. For some reason my most commonly used document type on a rather big site went bezerk. Almost all property aliases...
View ArticleA one file Asp Net web application with NancyFx and SisoDb
It’s hard to see how an Asp Net webapp with database functionality can be easier/less ceremony than with the help of NancyFx + SisoDb. The sample I’m going to show here is very far from a full real web...
View ArticleThree not so unusual pitfalls when it comes to db access
This is a short post about three recent problems we had, which all are related to data access in common scenarios. 1. Don’t pop the popcorn’s more than once. I threw in some db functionality in a...
View ArticlePlaying with EntityFramework Code First and “migrations” [5 minutes]
When EF 4 with CodeFirst came I was disappointed with the lack of automatic schema updates. Now a first version of “migrations” has arrived, which made me re-look at EF CodeFirst and make a small...
View Article