Category Archives: .NET

RavenDb EnsureDatabaseExists extension method

Just a quick hint for others like me, who spent some minutes searching for the EnsureDatabaseExists method when trying to use RavenDb with  Multi-Databases. EnsureDatabaseExists is an extension method on IDatabaseCommands defined in the Raven.Client.Extensions namespace. To make it work you need to add a using statement for this namespace.… read full article

Cassette – Asset management for .NET web apps

A few weeks ago i’ve started using Cassette, a very nice asset management tool for .net web applications. It will basically take your assets ( javascript, coffescript, css, images ) and do the right thing with them ( combine, minify etc).

While working with it i had a few issues which I’ve  managed to solve and i would like to share them.… read full article

.NET Serialization Choices – Raven.Json

This post is an addition to .NET Serialization Choices post.

I’ve added to the SerializationTests Project the new serialization implementation in Raven.Json.

The Raven.Json Serializer is an extension to Newtonsoft Json.NET serializer and as expected the results are similar. Also the Pros & Cons are similar:

Raven.Json

Optimized DOM for Newtonsoft Json.NET

Pro: JSON Based, human readable, platform… read full article

.NET Serialization Choices

Introduction

Serialization is not a trivial problem in any language. In .NET there are quite some choices available for serializing/deserializing objects. Each available option has it’s strengths and weaknesses.

I’ve started a project on git hub SerializationTests where i’m trying to determine what is supported by which library and draw a few conclusions that should be helpful when designing serializable objects and in general when dealing… read full article

New Github account

I’ve opened a Github account where i keep some stuff I’ve been playing with recently. At the moment is mostly related to doing DDD with CQRS and Event Sourcing.

I’ve created a sample project to demonstrate the concepts. Here is a short description of the sample:

Sample project demonstrating CQRS & Event Sourcing =================================================

The sample uses the following projects from Jonathan Oliver (https://github.com/joliver)

*… read full article

Log4Net not logging errors to db

This is a short post about logging errors to db with log4net.

I’ve recently been bitten by a bug or better said miss configuration of log4net. I’m using log4net with database logging and file logging in a project and i was wandering why there are no error messages logged in the db when they are logged in the log files configured.

At one point it hit me: Transactions… read full article

NServiceBus with NHibernate and MySQL

In the last project I have been working i finally got a chance to design and implement a solution based on NServiceBus and NHibernate, two tools I’ve been watching for a while but never got a chance to play with in more than sample applications. For some external reasons I’ve been forced to use MySQL as a database server in this project.

C# HTTP Request

A few years ago I’ve written an article on how to perform a synchronous HTTP request using Qt 4.2. I I’ve seen this article today and since now I’m mostly working with C# i was wandering how fast can i do the same thing in c#. After very few minutes I’ve managed to came up with this:
using System;
using System.Net;
using System.IO;

class Program
{
static… read full article