LINQ in .NET 2.0

by Johan Driessen 28. January 2009 11:07

Good news for everyone currently supporting older projects (.NET 2.0): You can use LINQ and Lambda-expressions in .NET 2.0! At least if you're using Visual Studio 2008 (which there is no reason not to do, is there?). The trick is that VS really use the same compiler för 2.0 och 3.5, and since LINQ is only a language feature, it is able to translate it to the same IL-code anyway.

This blogpost on explains how you do it. 

If you're still working in a .NET 1.1-project (god forbid), you're out of luck.

Tags: ,


blog comments powered by Disqus

Finding the page id for a property value in Extension 2.6

by Viktor 27. January 2009 08:46
Today I had to find on what page in EPiServer a Extension property string was set to a specific value and to do this I had to write four select statements to match fkID and pkID all the way up to the table extVariantData witch holds the holy grail, the EPiServerPageID. As this was not the first time this happend I wrote this stored procedure to make this task easyer. This stored procedure is only tested on EPiServer 4.62 and Extension 2.6 and will not work with EPiServer CMS and X3.
    @BooleanValue BIT=NULL,
    @Number INT=NULL,
    @FloatNumber FLOAT=NULL,
    @PageType INT=NULL,
    @PageLink INT=NULL,
    @StringValue NVARCHAR(1500)=NULL,
    @LongString NTEXT=NULL,
    @DateValue DATETIME=NULL

    SELECT EPiServerPageID
    FROM extVariantData
        SELECT VariantID
        FROM extInnerTemplateData
        WHERE ID IN
            SELECT InnerTemplateDataID
            FROM extContentBlockData
            WHERE ID IN
                SELECT ContentBlockDataID
                FROM extPropertyData
                    (@BooleanValue IS NULL OR BooleanValue=@BooleanValue) AND
                    (@Number IS NULL OR Number=@Number) AND
                    (@FloatNumber IS NULL OR FloatNumber=@FloatNumber) AND
                    (@PageType IS NULL OR PageType=@PageType) AND
                    (@PageLink IS NULL OR PageLink=@PageLink) AND
                    (@StringValue IS NULL OR StringValue LIKE @StringValue) AND
                    (@LongString IS NULL OR LongString LIKE @LongString) AND
                    (@DateValue IS NULL OR DateValue=@DateValue)

If you want to search a string just call the SP with the @StringValue or @LongString set to the string your looking for (you can use wildcards). If you look for a function pointing to a specific page call the SP with the @PageLink argument set to the EPiServer PageID.

Tags: , ,

blog comments powered by Disqus praised on IDG

by Johan Driessen 20. January 2009 17:03

When you're working in this line of business, developing web sites, that is, you're not that used to praise. Once a web site has been launched, most of what you hear is bugs and new feature requests. But once in a while we get the praise we deserve! :-)

Today the swedish magazine internetworld published a review of the public web sites for 6 of Sweden's largest unions. The site I have been working on,, got 9/10, and a splendid review, the title of which reads "Good looking and smart in a modern suit".

I worked on pretty most of 2007 as a Scrum master and systems architect. It was one of our first real Scrum projects here on Dropit, and I dare say one of the most successful ones so far. One the most important reasons for that was that we had a great Product owner (Karin), but also that we were a very good and dedicated team (you know who you are!). Dropit was responsible for the whole delivery, so we worked both with the conceptual and graphical design as well as with the technical implementation. The site is based on EPiServer 4.62 and our internal framework Foundation.

We had the privilege of having the whole team sitting together with the customer, which wasn't the standard way to do it for us back then. Since then we are advocating this more and more, since the collaboration with the customer really improved. It was also a technically challenging project, as we were heaviliy dependent on the SOA infrastructure being developed simultaneously, and we even had to work on New Year's Day to make the launch. But it really paid off, and it's extra fun for this to get recognized on!

So once again, thanks to all the people that worked so hard to create!

Tags: , , ,


blog comments powered by Disqus

Little big Planet does Duck Hunt

by Anders 19. January 2009 15:18

A lot have been written about the excellent game Little Big Planet. No need to say it all again here, let's just say that you really should buy it. I played through the game when I got it a couple of months ago and started to browse the user created levels. I found this gem:

I bet that must people that played Nintendo in the eighties remember Duck Hunt. Here you have it recreated in all it's glory. It even has the dog that laughs at you when you miss a duck. The dog has been named one of the most hated video game characters of all time. Unfortunately this level has been deleted by Sony due to copyright issues, they don't own the IP. But, by playing the Duck Hunt level in Little Big Planet I really had a chance to relive some traumatic childhood memories.

Tags: ,

blog comments powered by Disqus

Simple source control with Subversion and Dropbox

by Johan Driessen 14. January 2009 17:41

I noticed that the activity on this blog has been a bit low lately, probably due to the fact that everyone has been away for the holidays. Instead of nagging on everyone to start writing again, I though I should lead by example and write an entry myself first. :-)

This is on the same theme as my previous entry, Keeping things in sync, where I went on about how happy I am with Dropbox and Evernote to have access to all my important files and notes on all computers. Since then, I have discovered another great way of using Dropbox. 

I usually work on a few projects outside of work, and although I do want source control on these (mainly for the versioning), I can't put these in our TFS. So I did what every responsible developer does; set up a VisualSVN Server on my computer and use that one for the verison control (I use AnkhSVN for the VS integration by the way, works almost flawlessly for me). But now it happens that I have another computer at home, one that is faster (dual core E8400) and has a bigger screen (24"), and when I'm at home I like to use that one for programming instead of the laptop I use at work (Thinkpad X301, lots of name dropping here). One way is to turn on my laptop and connect to the server there. But that seems like a lot of work. You know, turning on the computer, finding out what IP the DHCP has assigned to it today and so on. And what if I left my computer at work?

Enter Dropbox. Again. I simply created a new folder in my dropbox folder, called SVN-repositories. Then I installed VisualSVN Server on both computers, and set it up to use the SVN-repositories folder to store the repositories. Done!

So now I have a local SVN server on both computers, that automagically keep in sync. If I do some work on one computer, the next time I start the other one Dropbox will inform me that it has updated a few obscure SVN-files, and that's it. Wunderbaum!

A word of warning though. I have no idea what would happen if you were to change data in both repositories at the same time. Probably something bad. Wouldn't try it. 

Tags: , ,


blog comments powered by Disqus

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 2.5 Sweden License.

Welcome to the Dropit blog!

Here we, the people that work at Dropit, will write about stuff that interests us. For example web development, especially with .NET and EPiServer - but we'll also talk about other techniques that interest us, marketing on the web, social phenomenons, pop culture, games and software development in general.