I’ve written a few posts about LINQ to SQL and am generally a big fan of the technology (even with its weaknesses) since it’s very productive. After creating a custom DataContext object using the LINQ to SQL designer (or one created by hand) I always ensure that the object is wrapped in a “using” statement so that the Dispose() method is called:
.NET 3.5’s LINQ to SQL functionality provides a great way to write data access layer code that automatically handles mapping relational data to object properties. Although I generally prefer to use stored procedures when performing insert, update or delete operations against a database (see my previous post on this), I still use LINQ to SQL in projects since it eliminates the time I used to spend creating SqlParameter objects or writing AddWithValue() parameter statements. Overall, LINQ to SQL has made me much more productive as a developer.
Arranging controls on a user interface in a flexible manner is key to building successful applications. Silverlight 2 provides three main controls that can be used for layout management:
I started working on a Windows Mobile application on Vista and couldn’t get the emulator to sync property with the Mobile Device Center. I’d synced device emulators long ago on XP with ActiveSync but just couldn’t get it working like I wanted on Vista. I had the different 6.0 and 6.1 SDKs installed, had the Cellular Emulator working perfectly with the device emulator but couldn’t sync to save my life. I needed to move over a C++ dll that needed to live in the device emulator’s Windows directory. After a lot of searching it turns out that all I had to do was enable DMA in the connection settings for the Mobile Device Center as shown next:
You can get to this dialog by going to Windows Mobile Device Center | Mobile Device Settings | Connection Settings. Once I had the DMA connection setup properly the Mobile Device Center was able to locate the emulator and allow me to get to the file system. Simple…once you know the trick. :-)