Apr 12, 2008

Using LINQ to SQL with SQL Server Compact Edition 3.5

Even though some LINQ books state otherwise you can use LINQ to SQL with Sql Server Compact Edition (SSCE). However, the visual Object Designer doesn't support that nifty drag and drop design approach, like it does with SQL Server 2005. That doesn't mean you can't use it though. Microsoft supplies a command line tool called SQLMetal that allows you to create all types of necessary files for LINQ to SQL. Rather than provide a long blog about how to do it I posted a screencast showing you how to do it

Oh yeah, and the reason I'm interested in SSCE is because it is required to use the new Microsoft Sync Framework which is a very exciting tool to support many database solutions but in particular to support the occasionally connected database scenario where employees who travel need to have the data with them and re-sync when they get home to the main SQL server database. If you are interested in this topic at all a great place to start is Daniel Moth's screencast (18 minutes) on Channel 9 showing the VS2008 wizard for ADO.NET Sync Services. An hour long screencast by Liam Cavanagh goes into a little more depth (including handling conflicts and using with a web service). Ground zero for ADO.NET Sync information is on the MSDN page.

About Me

My photo
Tod Gentille (@todgentille) is now a Curriculum Director for Pluralsight. He's been programming professionally since well before you were born and was a software consultant for most of his career. He's also a father, husband, drummer, and windsurfer. He wants to be a guitar player but he just hasn't got the chops for it.