I released version 0.5 of the
„ADO.NET Unit Testable Repository Generator„.
In a short time the download counter reached 900. W00t! :mrgreen:
This encouraged me to bring up an improved version. It now simplifies Unit Tests by implementing “Equals”. Additionally, the dependency to Microsoft Unity is now optional.
All resources were updated:
[ENGLISH] I found this presentation on my disk. It’s an introduction to the Windows Communication Foundation (WCF) that was released with .NET 3.0. The slides are in German only. But the demo solution is written in English.
@My Students: this is just for your interest! But I’m going to introduce Message Exchange patterns in the next lesson.
[DEUTSCH] Ich habe diese Präsentation auf meiner Festplatte entdeckt. Sie führt in die Windows Communication Foundation (WCF) ein, welche ab .NET 3.0 mit an Bord ist. Die Folien sind auf Deutsch. Mit dabei ist ein Demo-Anwendung.
[BOX_START]Please repeat the stuff and answer the following questions by mail:
1. What are Unit Tests?
2. Why and when should I use them?
3. How do I write Unit Tests?
We will continue with the 5th lesson at Wednesday, the 10th of November 2010.[BOX_STOP]
In this lesson I want to finish the sample solution. For me a programming task is only finished, if all necessary Unit Tests are written and if those tests finish successfully!
Please make sure, that you have the latest version of
on your laptop. (checkout with TortoiseSVN!)
This walkthrough is going to show you the usage of my new T4 template called „ADO.NET Unit Testable Repository Generator“.
Table of contents:
- Step 1: Create the Entity Data Model
- Step 2: Add the Code Generation Item
- Step 3: Use the Repository
- Step 4: Use the Unit Test
- Step 5: Download the sample solution
My demo implements a small repository to manage simple text-snippeds in the database. I will start with an empty ASP.NET MVC 2 project. Any other type would work, too.
At work we are going to do a big refactoring on a ASP.NET MVC project. I learned a lot of this project. One hard lesson was: the code base is as good is the guidance of the senior coders. If you know the power of the Entity Framework, then you also know the countless possibilities to write wicked code. But I’m present at the office only for days a week. That’s why I’m planning to write some articles in the next time.
tomorrow we will do some live coding. You should watch the NerdDinner video, if you haven’t done that already.
This time, no special preparation is required.
Please make sure that:
- Visual Studio 2010 is running
- MSSQL is running, too
- you have ASP.NET MVC 2 on your machine (use the Web Platform Installer)
Download the codes from http://code.google.com/p/lecture-hoppe/ .
In this lesson I want to concentrate on the server side of our application. As you already know, web applications are a very big topic. This time you will not need a lot of preparation, if you are already familiar with a scripting language like PHP or even a web application framework like Ruby On Rails.
But it is generally a very good idea to get in contact with ASP.NET MVC now! I can recommend the famous reference implementation “NerdDinner”.
In the next time am going speak about a lot about stuff that can be found in NerdDinner, too. So the following video is worth watching it: