POCO Entities in ADO.NET 4.0 - One of the most anticipated features of the Entity Framework 4.0 is the ability to have POCO (Plain Old CLR Object) entities. This allows developers to produce domain objects free of any persistence baggage, with no requirements imposed inheritance-wise. Up till now entity objects were required to either inherit EntityObject or had to implement IEntityWithKey, IEntityWithChangeTracker and IEntityWithRelationships. This makes it far easier to use EF with legacy domain classes and keeps data models clean and unconcerned with their own persistence. To demonstrate this feature I'll start out with a basic SQL Server table structure and test data that maps employees to departments. Database create table Departments ( Department_ID int identity primary key clustered, Name varchar(255) not null ) create table Employees ( Employee_ID int identity primary key clustered, FirstName varchar(255)...
Templating with NDjango - It never ceases to amaze me how many great open source tools and libraries have been ported to .Net. NUnit... NHibernate... NAnt... All incredibly widely adopted. Today, however I'd like to focus one that a coworker brought to my attention which may actually get some use at the office, NDjango. During my recent Django work I've become quite attached to Django's template language. It took me a while to warm up to it but I'm hooked. When I heard that the templating had been ported to .Net I was naturally quite interested. Examples As you'd expect, there really isn't all that much to it. Consider the following code /* The data we'll pass into the template */ Dictionary<string, object> context = new Dictionary<string, object>(); context.Add("name", "Chris Umbel"); context.Add("profession", "Database Administrator"); /*...











