Back to basics (pt 1)

Microsoft Dot Net is a family of products (One Asp.Net), but with any large family there’s going to be clashes of personality and tears before bedtime.


We’re working through some dot net projects at the moment and have found that the documentation along the way has ranged from none to poor, and trying to address a project that crosses so many of the family lines draws you into a mire of conflicts.

So i’m taking things back to basics. I’m pulling together a bunch of easy instructions to help aid learning. Some may find this too basic but it’s basic instructions that seem to be missing the most.

Referencing SQL compact

Add a reference (extension) to System.Data.SqlServerCe

Creating an SQL compact database (in Visual Studio)

Check out

SQL compact 4 and Entity Framework

Entity Framework creates a bridge for using objects codeside to sql objects database side. You then use Entity SQL language to interrogate the database. However LINQ to Entities now allows you to use LINQ language instead.

Scott Guthrie wrote about this

It seems good practice to write your entity layer as a separate Code Library project and calling this in your main project. More details on this are at


LINQ to SQL creates the framework for using objects codeside to map to sql objects database side. You then use LINQ language client side to form your queries.

LINQ to SQL gained a lot of traction post Entity 3, but with Entity 4 now supporting LINQ language this would seem to be once again the MS preferred ORM. 

If you still want to use this I found a great write up at