Category: NET World

Entity Framework 6 and Collections With DDD

If you start to work with Entity Framework 6 and a real Domain modeled following the SOLID principles and most common known rules of DDD (Domain Driven Design) you will also start to clash with some limits imposed by this ORM.

Let’s start with a classic example of a normal Entity that we define as UserRootAggregate. For this root aggregate we have defined some business rules as following:

  1. A User Entity is a root aggregate
  2. A User Entity can hold 0 or infinite amount of UserSettings objects
  3. A UserSetting can be created only within the context of a User root aggregate
  4. A UserSetting can be modified or deleted only within the context of a User root aggregate
  5. A UserSetting hold a reference to a parent User

Based on this normal DDD principles I will create the two following objects:

A User Entity is a root aggregate

/// My Root Aggregate
public class User : IRootAggregate
   public Guid Id { get; set; }

   /// A root aggregate can be created
   public User() {  }

A User Entity can hold 0 or infinite amount of UserSettings

public class User : IRootAggregate
   public Guid Id { get; set; }
   public virtual ICollection<UserSetting> Settings { get; set; }

   public User()
      this.Settings = new HashSet<Setting>();

A UserSetting can be created or modified or deleted only within the context of a User root aggregate

    public class UserSetting
       public Guid Id { get; set; }
       public string Value { get; set; }
       public User User { get; set; }
       internal UserSetting(User user, string value)
          this.Value = value;
          this.User = user;
    /// inside the User class
    public void CreateSetting(string value)
       var setting = new UserSetting (this, value);
    public void ModifySetting(Guid id, string value)
       var setting = this.Settings.First(x => x.Id == id);
       setting.Value = value;
    public void DeleteSetting(Guid id)
       var setting = this.Settings.First(x => x.Id == id);

So far so good, Now, considering that we have a Foreign Key between the table UserSetting and the table User we can easily map the relationship with this class:

public class PersonSettingMap : EntityTypeConfiguration<PersonSetting>
   public PersonSettingMap()
       HasRequired(x => x.User)
           .WithMany(x => x.Settings)
           .Map(cfg => cfg.MapKey("UserID"))

Now below I want to show you the strange behavior of Entity Framework 6.

If you Add a child object and save the context Entity Framework will properly generate the INSERT statement:

using (DbContext context = new DbContext)
   var user = context.Set<User>().First();
   user.CreateSetting("my value");


If you try to UPDATE a child object, again EF is smart enough and will do the same UPDATE statement you would like to get issued:

using (DbContext context = new DbContext)
   var user = context.Set<User>()
                     .Include(x => x.Settings).First();
   var setting = user.Settings.First();
   setting.Value = "new value";


The problem occurs with the DELETE. Actually you would issue this C# statement and think that Entity Framework like any other ORM does already, will be smart enough to issue the DELETE statement …

using (DbContext context = new DbContext)
   var user = context.Set<User>()
                     .Include(x => x.Settings).First();
   var setting = user.Settings.First();


But you will get a nice Exception has below:


An error occurred while saving entities that do not expose foreign key properties for their relationships.

The EntityEntries property will return null because a single entity cannot be identified as the source of the exception.

Handling of exceptions while saving can be made easier by exposing foreign key properties in your entity types.

See the InnerException for details. —>

System.Data.Entity.Core.UpdateException: A relationship from the ‘UserSetting_User’ AssociationSet is in the ‘Deleted’ state.

Given multiplicity constraints, a corresponding ‘UserSetting_User_Source’ must also in the ‘Deleted’ state.

So this means that EF does not understand that we want to delete the Child object. So inside the scope of our Database Context we have to do this:

using (DbContext context = new DbContext)
   var user = context.Set<User>()
                     .Include(x => x.Settings).First();
   var setting = user.Settings.First();

   // inform EF
   context.Entry(setting.Id).State = EntityState.Deleted;


I have searched a lot about this problem and actually you can read from the Entity Framework team that this is a feature that is still not available for the product:

NCache with .NET 4

I am very excited about this new series I am publishing today. It’s all about caching, a very useful portion of your architecture that should be seriously taken into consideration, especially if you are designing a web application.

Actually, I used NCache with NHibernate and I can only say that it is a very good and valuable product. Of course most of you may believe that I got a free license so this is the reason of my review. Actually I am reviewing this product because I found it pretty good and that’s why the review came up with a short series of articles.

I will show you the following features of NCache:


From NCache documentation:

NCache is a clustered caching solution that makes sharing and managing data in a cluster as simple as on a single server. It accomplishes this by coordinating updates to the data using cluster-wide concurrency control and replicating and distributing data modifications across the cluster using the highest performing clustered protocol available. The primary purpose of NCache is to help improve performance of .NET applications that would otherwise make expensive trips to database systems, web services, mainframes, or other systems across the network.

Below is a very simplified diagram of NCache architecture (please forgive me for the simplicity of this architecture design):


So, how does it work?

The explanation is pretty simple but in the same time is represented by a complex architecture. You can have two different type of Cache, a local cache or a remote cache. The first one will work because the client has a cache server installed locally, the second one will work with the client accessing the remote cache server from the network.


Of course you can easily swap from a local configuration to a remote configuration without even need to restart or rebuild your application, plus you can easily add or remove cache clusters to your architecture using an “hot swap” technology that doesn’t require any reboot or re-configuration.


Let’s try to get practical and let’s write some code, otherwise this blog post will get really boring! Winking smile

In order to use NCache you have to go to this web address and download a 60 days trial version: There are three major versions: NCache for .NET (x86 and x64) in two flavors, Enterprise and Professional, NCache for Java (x86 and x64) and NCache express (a free version with a limited amount of features). In this demo I will use the full version for .NET in x64 bit Professional. The setup for the professional edition is about ~30 Mb and it’s pretty quick to install.

Note: the only problem you may encounter is with Windows UAC because NCache works better if UAC is disabled. To know more about UAC go here: MSDN Windows ACL

The Wizard will propose you three different types of installation, like the screenshot below:


In my case I need a developer license because I will run everything from my machine and I need also to have access to NCache API. The cache server installation is used to install a new cluster while the Remote Client installation is used to install the client connection components used by your applications to access the remote cache servers.

As soon as NCache is installed you will get a new icon in your start menu (in my case is a tile because I have Windows 8):


In the next posts I will show you how to configure your first cache and how to write a WPF application that will work against this cache.

Stay tuned

NCache, simple caching of objects.

In the previous post I have introduced you to NCache architecture. In this post we will create our first cache (locally) and we will write some C# code to interact with this cache.

For the purpose of this series I have created a very simple WPF 4.0 application available from my SkyDrive (see below at the end of this post) that you can download and run locally; but of course you need to install NCache in your development machine.


With this very simple WPF application (even if very simple it works with IoC and MVVM) I have a Listbox that will provide a list of items (books titles). The list will be retrieved with the first command from a database, with the second command from the cache and with the third command the cache will be cleared. The cache is populated automatically after you retrieve the data from the database.

Note: I am including the full source code of this series but this is not a series about MVVM and/or WPF so I will not provide that code inside the posts in order to stay focus on the topic, which is NCache.

Create a new local cache

First of all we need to create a new cache in NCache and this can be easily accomplished using the UI of NCache. Open you instance of NCache and create a new local cache, which is going to be more than enough for our demo.

The following picture shows the steps you need to follow to create a default local cache in your system.


  1. Create a new local cache
  2. Select the current machine as the destination of the local cache
  3. Name the cache
  4. Configure the memory allowed by this cache
  5. Configure the objects lifecycle for the cache

At this point, NCache will create the new cache and if you have configure it to startup the cache right away, the NCache IDE will open a new window showing you the NCache health status. From this window you can monitor the amount of objects created by the cache and many other functionalities.

Retrieve the data from the database

In this project I have created a very simple database structure that contains a table with a bunch or rows, each row represents a Book record. The data is retrieved using Entity Framework and this is the code used to populate the Listbox:

   1: public IList<Book> GetListOfBooks()

   2: {

   3:     using (var orm = new ORM())

   4:     {

   5:         var results = orm.GetListOfBooks();

   6:         return results

   7:             .Select(result => 

   8:                 new Book {Title = result.Title, ISBN = result.ISBN})

   9:                 .ToList();

  10:     }

  11: }

The data is then DataBound to a WPF listbox using the MVVM pattern:

   1: <ListBox 

   2:    Grid.Column="0" Grid.Row="1" Grid.RowSpan="3" 

   3:    Style="{StaticResource ListboxStyle}" 

   4:    ItemsSource="{Binding Books,IsAsync=True}">

   5:     <ListBox.ItemTemplate>

   6:         <DataTemplate>

   7:             <StackPanel>

   8:                 <TextBlock Text="{Binding ISBN}" />

   9:                 <TextBlock Text="{Binding Title}" />

  10:             </StackPanel>

  11:         </DataTemplate>

  12:     </ListBox.ItemTemplate>

  13: </ListBox>

And the listbox shows the final results:


Retrieve the data from the cache

The second command of the UI is calling the cache, instead of calling the database, to retrieve the data. But, how does it work? I have drawn below a very simple logical flow that my application follows in order to retrieve the data from the cache, when available.


And this is how it works:

   1: // initialize the cache

   2: using (Cache cache = NCache.InitializeCache("Cache"))

   3: {

   4:     var list = new List<Book>();

   5:     // if cache empty, populate the cache

   6:     if (cache.Count == 0)

   7:     {

   8:         IList<Book> books = GetListOfBooks();

   9:         foreach (Book book in books)

  10:         {

  11:             cache.Add(book.ISBN, book);

  12:         }

  13:     }

  14: }

Of course this is just a simple implementation to show you how the NCache mechanism works. It is like working with a simple dictionary of objects if you are not implementing NCache on top of another caching framework.

As soon as you add the items to the cache, the NCache management studio will show you the new objects cached in the system:


Few final notes

  • First of all you need to orchestrate your application in a way that the cache will be bootstrapped with the application, bootstrapping the cache in a method of the data layer like I did it is absolutely wrong!
  • The objects contained inside the cache, like any other cache system, must be serializable otherwise you will receive a nice runtime exception from NCache.

Sharing assembly version in Visual Studio 2010.

Last week I came up with a fancy requirement that forced me to struggle a little bit in order to find an appropriate solution. Let’s say that we have a massive solution file, containing something like 100ish projects and we would like to keep the same assembly version number for all these projects.

In this article I will show you how the assembly version number works in .NET and what are the possible solutions, using Visual Studio.

Assembly version in .NET

As soon as you add a new project (of any type) in Visual Studio 2010, you will come up with a default template that contains also a file “AssemblyInfo.cs” if you are working with C# or “AssemblyInfo.vb” if you are working with VB.NET.


If we look at the content of this file we will discover that it contains a set of attributes used by MSBuild to prepare the assembly file (.dll or .EXE) with the information provided in this file. In order to change this information we have two options:

  1. Edit the AssemblyInfo.cs using the Visual Studio editor.
    In this case we are interested in the following attributes, that we will need to change every time we want to increase the assembly version number:
       1:  using System.Reflection;
       2:  using System.Runtime.CompilerServices;
       3:  using System.Runtime.InteropServices;
       5:  [assembly: AssemblyVersion("")]
       6:  [assembly: AssemblyFileVersion("")]

  2. Or, we can open the Project properties window from Visual Studio using the shortcut ALT+ENTER or by choosing “properties” of a VS project file from the Solution Explorer


How does the versioning work?

The first thing that I tried was to understand exactly how this magic number works in .NET.

If you go to the online MSDN article, you will find out that the version number of an assembly is composed by 4 numbers, and each one has a specific mean

1. Major = manually incremented for major releases, such as adding many new features to the solution.

0. Minor = manually incremented for minor releases, such as introducing small changes to existing features.

0. Build = typically incremented automatically as part of every build performed on the Build Server. This allows each build to be tracked and tested.

0 Revision = incremented for QFEs (a.k.a. “hotfixes” or patches) to builds released into the Production environment (PROD). This is set to zero for the initial release of any major/minor version of the solution.

Two different assembly version attributes, why?

I noticed that the [assembly] attribute class exposes two different properties, Assembly Version and Assembly File Version.


This attribute should be incremented every time our build server (TFS) runs a build. Based on the previous description you should increase the third number, the build version number. This attribute should be placed in a different .cs file for each project to allow full control of it.


This attributes represents the version of the NET assembly you are referencing in your projects. If you increase this number in every TFS build, you will incur in the problem of changing your reference redirect every time the assembly version is increased.

This number should be increased only when you release a new version of your assembly and it should be increase following the assembly versioning terminology (major, minor, …)

Control the Versioning in Visual Studio

As I said before VS allows us to control the version number in different ways and in my opinion using the properties window is the easiest one. As soon as you change one of the version numbers from the properties window, also the AssembliInfo.cs file will be automatically changed.

But what happens if we delete the version attributes from the assembly info file? As expected VS will create an assembly with version like the picture below:


Note: if we open the Visual Studio properties window for the project and we write down the version for both, Assembly and AssemblyFile attribute, VS will re-create these two attributes in the AssemblyInfo.cs file.

Sharing a common Assembly version on multiple projects

Going back to the request I got, how can we setup a configuration in Visual Studio that allows us to share on multiple projects the same assembly version? A partial solution can be accomplished using shared linked files on Visual Studio.

Ok, what’s a shared linked file, first of all? A linked file is a file shortcut that points in multiple projects to the same single file instance. A detailed explanation of this mechanism is available on Jeremy Jameson’s blog at this page.

Now, this is the solution I have created as an example where I share an AssemblyVersion.cs file and an AssemblyFileVersion.cs file to the entire Visual Studio solution.


Using this approach we have one single place where we can edit the AssemblyFileVersion and the AssemblyVersion attributes. In order to accomplish this solution you need to perform the following steps:

  1. Delete the assembly version and the assembly file version attributes for all the existing AssemblyInfo.cs files
  2. Create in one project (the root project) a file called AssemblyFileVersion.cs containing only the attribute AssemblyFileVersion
  3. Create in one project (the root project) a file called AssemblyVersion.cs containing only the attribute AssenblyVersion
  4. Add as linked files these two files to all the existing projects
  5. Re-Build everything

Final note on Visual Studio properties window

Even if my root project has now two files with the attributes AssemblyFileVersion and AssemblyVersion, when I open the Visual Studio properties window, it tries to search for these attributes in the AssemblyInfo.cs file, and clearly, it can’t find them anymore, so it does not display anything:


If you add a value to these textboxes Visual Studio will re-create the two attributes in the AssemblyInfo.cs file without taking care of the two new files we have created and as soon as you try to compile the project you will receive this nice error:


So, in order to use this solution you need to keep in mind that you can’t edit the AssemblyFileVersion and the AssemblyVersion attributes from the VS properties window if they are not saved in the AssemblyInfo.cs file!

I believe that MS should change this in the next versions of Visual Studio.

Winking smile

NET Event–Migrating WinForm application

Last month (21st of July 2011) I spoke at the Bermuda NET Event “Migrating WinForm applications to WPF/Silverlight”. This has been for me the first NET Event in Bermuda but for sure it will not be the last one. We are planning to have a new event this autumn where we will touch other topics like: ALM, Parallels and more.

Thanks to Alessio Bellisomi, the web developer that works in my company, I am able to share with you some nice pictures of the event and three short movie of the event. Unfortunately, for this event, we were not super organized so I do not have with me the full video of the entire event. I promise that for the next event we will provide the entire video and maybe we will be also able to stream the content.

The audience, considering that we were in Bermuda and considering that it was end of July, was more than expected. I believe we were around a 30/40 ish attendees. The feedback has been really positive and we expect a very fast grow of this UserGroup by having more events and more speakers.


The pictures are available through Google photos



The videos have been hosted on my Vimeo account and they can be viewed through their web site

Bermuda WinForm event, part 01 from Raffaele Garofalo on Vimeo.

Bermuda WinForm event, part 02 from Raffaele Garofalo on Vimeo.

Bermuda WinForm, part 03 from Raffaele Garofalo on Vimeo.


Special thanks need to go to Sandra de Silva (president of the UG and owner of Nova Ltd) and to the other members of the committee. I want also to thank all the participants and I hope this autumn there will be more!

New content for my Microsoft book

The Microsoft’s book I have published few months ago: “Building Enterprise Applications with WPF and MVVM” has been a success but I still got some negative feedbacks that me and my editor we want to get rid off.

This book is my first real book and of course it was my first experience on writing a book (for this reason we kept the price of the book very low). Anyway .. I got some bad feedbacks about missing parts, parts not explained as expected and a misunderstanding of the book audience and target.

I personally believe that the biggest problem is in the title of book, it drives you a little bit out of the topic of the book, if you buy this book you will believe to get the “bible to LOB applications with MVVM”, which is not.

For this reasons and also to keep high the audience of the book, we have decided to deliver for free new additional content for the book! Open-mouthed smile

The list of the new content is still under discussion with my editor but this is a rough list of the topics I will touch or expand in this new context that should be composed by 3 additional chapters!

  • Design patterns
    I am planning to add 20/30 additional pages on the second chapter in order to exhaustively cover everything related to the most known design patterns
  • Advanced MVVM
    I will add a new chapter where I will explain some “well known” problems you may find when the adoption of the MVVM pattern starts to get tricky!
  • Composite Frameworks for MVVM in practice
    In this chapter we will build the same Master-Detail UI logic using the three most famous frameworks for WPF/Silverlight: PRISM, Caliburn and Light Toolkit

If you believe that the book is still missing other information, feel free to send me an e-mail and I will be glad to discuss this with my editor.

Note: Remember also that we are planning to distribute the source code of the book as an Open Source project on before the end of the year.

Hope this will help!

Applied WPF in context is out.

During the last two months I have been away from Bermuda and I didn’t have a lot of time to write or post any news on this blog.

In the meantime, I didn’t realize that my new book from APRESS: “Applied WPF 4 in context” has been published so it is time to post some info about it.

The cover of the book is following the APRESS new style and it is the following one:


The new series “applied in context” of APRESS deliver content by example and practical code, so in this book you will realize a full working WPF 4 application using all the available tools of Microsoft like: Visual Studio 2010, Expression Blend 4 and SQL Server 2008 R2.

Who this book is for?

This book is for Windows application developers who want to understand the context in which WPF sits and the standards and best practices that can be employed to improve the efficiency and maintainability of their projects. This book can be used by a junior developer to learn WPF and understand how to architect a layered application, and it can be used also by a senior developer as a reference for developing scalable WPF applications.

Table of content.

Following is the table of content of the book:

  1. Introducing WPF and XAML
  2. Sample Application: Overview and Getting Started
  3. Microsoft Expression Blend
  4. Creating the Views
  5. Adding Controls to the Views
  6. The Entity Framework
  7. Data Binding
  8. Command Handling and Event Routing
  9. Testing with TDD   
  10. Reports with Microsoft Reporting Services
  11. Deploying the Application Using ClickOnce
  12. Design Patterns in WPF
  13. WPF and Multi-Threading
  14. Interacting with WCF


The book is released and published by APRESS so in this case the book can be bought from the APRESS web site or from one of their distributors. Right now, Amazon has already run out of copies so you should expect the next distribution starting the 7th of June for the Paperback copy. You can still download the e-book from or APRESS. I am not sure I will distribute this book also with Kindle as I had some issues with the previous one so for now it won’t be available directly in the Kindle web site or in the iBook application for iPad.

Right now you can buy the book here:

The are also other distributors that I do not personally follow but I believe that buying the book directly from APRESS will give you the best price/availability options.


This is the list of the official prices, if you find the book with a different price from a different distributor than the one listed in the previous section I am not aware about it, so please let me know if you believe someone is distributing the book with a non fair price.

Print version with shipment from APRESS including TAX: 49.99 USD

E-book version from APRESS including TAX: 34.99 USD

Enjoy and as usual, let me know what you think about it! Hot smile

My book for Model View ViewModel (MVVM) and n-tier applications is out

(a.k.a. Buy one copy!)

Finally I am excited and glad to let you know that my first book: “Building Enterprise Applications with Windows® Presentation Foundation and the Model View ViewModel Pattern” is out and available through the major IT books distributors like:, kindle, and more.



Please forgive me if I am missing some of my distributors but I do not have yet the full list. The book is available through the oReilly website at this address: in the following formats: PDF, EBOOK, KINDLE and PAPERBACK (hard copy); of course the hard copy costs a little bit more.

You can also order the book using at this address; unfortunately, Amazon will not start to deliver the book until the 1st week of April 2011 while if you order the book from the oReilly web site, you can get it right away.


On amazon, the hard copy costs $19.99 and the Kindle version costs $14.99.

On oReilly the hard copy is $19.99, the Ebook is $14.99 and both together cost $21.99

Free Copies

I have assigned some free copies to the participants of the last UGIALT conference, I will send them a free copy of the book as soon as I will get the green light from oReilly. I am planning to distribute other free copies at the next .NET community event and I will let you know when this will be. For now, buy a copy and make me happy! Open-mouthed smile


First of all I want to thanks oReilly and Microsoft to let me write this book. I also want to thank Russell Jones, my editor and primary publishing contact for this book. He is the only person who believed in me from the beginning, and he put himself on the line to get this project approved by Microsoft Press. I will be always thankful to him for that. He did also a wonderful job in helping me to complete the job on time, and to organize the whole project. Thanks to Kristen Borg, my production editor that spent a lot of time and effort to finalize and get this project done.

Of course I have to thank my wonderful wife that for the last 6 months she helped me in getting this job done by pushing me every time I was letting go the project for one or another one reason.


Please, please, please. If you plan to buy a copy of the book ( I hope so) I would really appreciate if you can leave a comment, on Amazon or on OReilly or on both of them and let me know what you really think about it. I love to get constructive criticisms on my work as they always help me to do the next thing better. Please, don’t be shy and don’t be nice if I do not deserve it!


I have received already a lot of requests about the book and the distribution. So, if you want an hard copy or an ebook you can get one, right away on the OReilly web site. If you go on, the book, the Kindle version or the EBook will not be distributed until the end of March 2011. If you need details about the book content, I am planning to write a new blog post ASAP.

VSDocMan review–Auto generate VS Help

In these days I have been busy in the office by implementing a mechanism of C.I. (Continuous Integration) by releasing some facilities assemblies so that the developers that are working with me will be able to work always with the latest version of a specific .dll.

One of the most important thing I noticed when you work with a third-party or a legacy .dll is the documentation needed within the code. If you think for a moment on what you do when you work with .NET Framework, every time you do not know how to use a specific component or a specific class, you simply type and you start to search in the help directory for some sample code or for a documentation.

The same important thing has to be done when you work with a third-party component or simply when you are in charge of releasing a facility assembly/framework like I do in my office.

Before showing you what I have found over the internet to solve the problem of generating the documentation, I want to explain you a little bit how the Visual Studio documentation system works.

Visual Studio documentation mechanism

One of the features included in Visual Studio, since one of the first version (maybe 2003/2005?) is the XML embedded documentation that allows you to write documentation in an XML format like the following example:

Sample documented Class
  1. /// <summary>
  2. /// Class level summary documentation goes here.</summary>
  3. /// <remarks>
  4. /// Longer comments can be associated with a type or member
  5. /// through the remarks tag</remarks>
  6. public class TestClass
  7. {
  8.     /// <summary>
  9.     /// Store for the name property</summary>
  10.     private string _name = null;
  12.     /// <summary>
  13.     /// The class constructor. </summary>
  14.     public TestClass()
  15.     {
  16.         // TODO: Add Constructor Logic here
  17.     }
  19.     /// <summary>
  20.     /// Name property </summary>
  21.     /// <value>
  22.     /// A value tag is used to describe the property value</value>
  23.     public string Name
  24.     {
  25.         get
  26.         {
  27.             if (_name == null)
  28.             {
  29.                 throw new System.Exception(“Name is null”);
  30.             }
  31.             return _name;
  32.         }
  33.     }
  35.     /// <summary>
  36.     /// Description for SomeMethod.</summary>
  37.     /// <param name=”s”> Parameter description for s goes here</param>
  38.     /// <seealso cref=”System.String”>
  39.     /// You can use the cref attribute on any tag to reference a type or member
  40.     /// and the compiler will check that the reference exists. </seealso>
  41.     public void SomeMethod(string s)
  42.     {
  43.     }
  45.     /// <summary>
  46.     /// Some other method. </summary>
  47.     /// <returns>
  48.     /// Return results are described through the returns tag.</returns>
  49.     /// <seealso cref=”SomeMethod(string)”>
  50.     /// Notice the use of the cref attribute to reference a specific method </seealso>
  51.     public int SomeOtherMethod()
  52.     {
  53.         return 0;
  54.     }
  56.     /// <summary>
  57.     /// The entry point for the application.
  58.     /// </summary>
  59.     /// <param name=”args”> A list of command line arguments</param>
  60.     static int Main(System.String[] args)
  61.     {
  62.         // TODO: Add code to start application here
  63.         return 0;
  64.     }
  65. }

By using this documentation technique you are giving to your code an additional immeasurable value; especially if you work with some Visual Studio plugin like Resharper, for example, you will come up with a nice and well formatted intellisense suggestion if you decorate the code in this way.


If you want to learn more about it, MSDN offers a great section about the XML documentation in Visual Studio 2010 and how it should be used.

This is a great article that gives you a full overview of this technology:

Documentation with VSDocMan

Last week, after I started working on this C.I. project I just realized that now, more than everything, the other guys that will use my code will need tons of documentation in order to understand how to use my toolkits an facilities. Well I do not want to “blown my own trumpet” but I can easily say that I usually document whatever I write and that I use a lot Resharper and StyleCop to make my code readable and uniform. Unfortunately I am very allergic to .chm files in general.

I have this tool that is called VsDocMan my lifeline and I want to show you how it works; trust me it is simply AWESOME! Hot smile

First of all you can generate VS documentation with a simple Click on the toolbar or in the context menu; in fact VSDocMan allows you to self-document your classes with some pre-defined XML schemas

Automatic insertion of XML comments

Another interesting feature is the Comment Editor command, with this command VSDocMan will show you an interactive MSDN style documentation of how the final doc will look like so that you can easily change your documentation structure in a WYSIWYG editor without the need of struggling with the ugly XML

Editor for XML documentation comments

Plus it allows you to generate a dynamic class diagram that is clickable and that points to the corresponding documentation file!

VSDOCMan generates a lot of different documentations: .chm, MSDN style, MSDN V2, HTML, a full MSDN HTML web site and much more. It is very cheap in my opinion for what it does and if you are looking for a professional and fully working solution to generate documentation from your code, you should seriously consider to spend some time and money on this AWESOME product.

As usual, my two cents. Just kidding

We are hiring in Bermuda, two senior Devs.

Hi guys, I am glad to let you know that my Company is hiring two devs. The Company is growing and the IT team has to grow too!

Actually I am looking for two Senior Developers that are interested in join our cool team here in Bermuda and may also consider to relocate in the future to the awesome San Francisco, in US. The first period will be in Bermuda than it will be up to you to decide to stay in Bermuda or move to SF.

If you believe you are one of them that can make the difference, just contact me through my blog and I will let you know what to do and where to send the application.

Right now we are looking for two senior developers with the following characteristics:

  • At least 5 years of experience with Windows Form and possibly good knowledge of WPF too. I am not interested in Silverlight and we don’t use it here.
  • Good knowledge of WCF, how it works and how it can be used in a SOA environment.
  • Preferred, good knowledge of WF (Windows Workflow). The version 4, not the old version 3.5. Winking smile
  • Absolutely, at least basic knowledge of what an O/RM is, NHIbernate and Entity Framework. Related topics like UnitOfWork, Repository, Transactions and so on …
  • Preferred knowledge of a Client UI composition Framework like CAB, SCSF or Prism. This is what we use here! Winking smile
  • Good knowledge of agile techniques in general, DDD, TDD and all the other fancy words we use in our job … Smile

If you believe you are one of those guys out there that can make the difference, that you are eager for knowledge and you want to work in a nice place like Bermuda is, give me a shot! Of course you will work with me … Surprised smile

PS: Just to make it clear, I am not interested in: remote consulting, remote whatever, consulting, job agencies and so on. Winking smile