Archive for October, 2010

In this post and couple of posts to follow, we will discuss about the different type casting mechanisms supported by CLR and the three primary CLR supported languages C#,VB.NET and C++/CLI.To start with, lets take a look into the two possible kinds of conversion scenarios, that generally we come across.

(more…)

In my last post I had discussed about entity relationships,navigational properties and how we can fetch data from database into the entities.In this post we will examine the many to many relationships and how this can be modeled using POCO and the CTP 4.0 Code First Approach.We will consider three tables Person,Club and ClubMember where each Person can belong to multiple Clubs as shown below:

(more…)

In the last two posts I have discussed about Entity Framework CTP 4.0 Code First Approach and Database Initialization.Now we will take a look at how to define relationships and navigational properties between the Entities and how data fetching is impacted by these.

(more…)

In the last post we discussed about the basic steps involved in working with the new Entity Framework CTP 4.0 Code First Approach.Now we will take a look at each of these steps in a bit more detail.We will start with database initialization.
(more…)

It has been a month or two  that Entity Framework CTP 4.0 bits have released.I had read through the feature list back then but could not manage time to take a detailed look until this weekend.I always felt that Entity Framework’s approach towards handling of configuration(object relational mappings) and plain .NET objects was bit restrictive and cumbersome respectively.The mappings are needed to be stored in Entity Data Model(.edmx) files which are nothing but xml files with object to relational store mapping information.There was no proper way to express this mapping through code or attributes.But with code first approach we will able to describe our model using plain .NET objects and map it to the database objects through .NET code.In this post we will discuss the very basic steps involved in doing so.

(more…)