Onion Architecture – C#.NET

If you never heard about the “Onion Architecture”, you should read Jeffrey Palermos blog post. He’s the Onion-Architecture-Guru 😉 I created a very small demo VS.NET solution, which shows how I would apply this type of architecture in a project. (The download link is at the bottom of this post.) The following graph displays the… Read More »

Using Neo4j Graph DB With C#.NET

In the following example I’ll explain how to access the Neo4j database with the Neo4jClient. I’ve used both components in a project and was very satisfied. Information about Neo4j: http://neo4j.org/ Information about Neo4jClient: http://hg.readify.net/neo4jclient/wiki/Home For this demo I created an entity class called Person. This class will be represented in Neo4j as a node. public… Read More »

Entity Framework ‘Code First’ Approach and Domain-Driven Design

With the Code First approach we can create clean entities without any EF specific code. After the first demo, I saw that you have to deal with the IDbSet interface, which is placed in the Entity Framework library. When you place the entities in your business dll you have to reference the EF library. This… Read More »

Using A Document Database – RavenDB

RavenDB is a document database. The main difference between RavenDB and a relational database is, that RavenDB doesn’t support relation between the rows/entities/documents. A document contains structural data, which is stored in JSON format. This is a quickstart into RavenDB: Step 1 – Database: Create a new database. This DB doesn’t contain any structure. It’s… Read More »

Easier Programming With Dynamic Data Type .NET 4.0

When you deal with very dynamic dictionaries, you have always to check if the data exists before accessing it. This can blow up your code. With the dynamic data type (.NET 4.0) you can do this a little bit more elegant. Example: Here are my data classes. You see that the Person class has a… Read More »


The new ASP.NET MVC Razor view engine is pretty cool. 🙂 Here are some examples: Namespaces: @using MyProject.Entities Define model type: @using MyProject.Entities @model User Create functions: @functions { public string GetSomething(User usr) { return usr.Name; } } Templating: // In your template <html> … @RenderSection(“MyContent”, true) // true = required <br /> @RenderSection(“MyFooter”, false)… Read More »