Home » General

This situation occur if you have already the object inside the DbContext and you try to Attach your instance. Most of the time you can manage it but just remove the Attach method but in some case that you might not know if the instance is inside the DbContext you may would like to check it before attaching. This can be done with the help of DbSet and...
In a previous post concerning the IValidatableObject with Asp.Net MV3 we have discussed the powerful of the IValidatableObject interface with MVC framework which is a fast solution to handle error in the model, error in the model binding and error in the controller. What is great by using Microsoft ecosystem is that most of the framework work well...
I am far from being an expert in Regex but with good tools writing a Regex become easier. First, I suggest you to download is RegexBuilder from Renschler. This Regex tool is ideal once the Regex is created to check few sentence and to quick see if something is wrong or not. RegexBuilder The second tool is something for helping you to create the Regex....
Filed in: C#, General, Regex, Softwares
You need to open the solution where you want to have the latest version of EF. If you are running under .Net 3.5, big chance that you are running on the version 1. If you are running on .Net 4.0 you should be on the EF version 4. The 4.1 require to do some manual change. First, be sure you have the NuGet extension. NuGet package installed Second, open...

C# Sealed Method

Posted by on September 19, 2011
The keyword sealed is used in class definition to prevent being derived from. When it’s apply to methods, it mean that the method cannot be overrided. Well, in fact, method can only be overrided when the virtual keyword is used so why sealed is required? It’s required when a class derive from a class that had a virtual method. This one...
Filed in: General
Microsoft Entity Framework (EF) is available with the Microsoft .Net Framework 3.5 since the first service pack. This is pretty interesting for WPF (Windows Presentation Foundation) form, Console or traditional Windows form application that does not need to add an additional assembly into their setup package. What is Entity Framework in short? In short,...
wordpress themplates