Fellow MVP Nick Randolph (@BTRoam) publishes an excellent blog, Nick’s .NET Travels, often with articles that relate to SQL Server Compact and synchronization technologies, but also very useful articles for any Windows Phone developer, with a practical, hands-on approach. Highly recommended.
He has recently published the following articles:
Windows Phone LINQ to SQL and the INotifyPropertyChanged and INotifyPropertyChanging Interfaces
This article demonstrates the importance of implementing the INotifyPropertyChanging interface on your DataContext classes to improve memory management. As he points out, you should use SQLMetal to generate your DataContext, as this will avoid missing to implement these interfaces. Or even better use the SQL Server Compact Toolbox Visual Studio add-in, as it adds the following features on top of SQLMetal:
1. Removes unneeded/unsupported constructors
2. Adds any [Index] attributes to each table
3. Adds the CreateDatabaseIfExists method
4. Optionally splits the generated files into a file per table (in next version (2.4), currently available in beta)
Change Tracking with SQL Server Compact (LINQ to SQL) on Windows Phone
This article demonstrates how to get started using SQL Server Compact Change Tracking with a Windows Phone SQL Server Compact database, despite the fact that the Change Tracking APIs are not available on Windows Phone. He also gets thrown in how to use the Windows Phone SDK ISETool to move the database from the Phone (Emulator) to your local disk. Good stuff.
No comments:
Post a Comment