Wednesday, January 30, 2013

SQLite with a bit of MVVM Light in Windows Phone 8

SQLite with a bit of MVVM Light in Windows Phone 8

1/30/2013

Please, tell us what you think about this news by voting

source: spikie.be

While SQLce is still a viable solution in Windows Phone 8 to have some form of local database we also have an official SQLite implementation available. So why use SQLite when we can just keep using SQLce? Because Windows 8 only support SQLite and if you ever want to port over your app it would be nice not to have two versions of local databases to maintain. In this post I'll explain how to implement a SQLite database into an MVVM Light Windows Phone 8 project (there is an unofficial Windows Phone 7 SQLite version as well but I have no idea how stable / buggy that is). I'll be using Tim Heuer's SQLite .net wrapper so we can use LINQ to SQLite instead of writing SQL queries manually (hooray for intellisense ). Let's kick things off by creating an empty Windows Phone 8 app.

SQLite

Before we can use SQLite, we'll need to install the SDK. Click here (official SQLite download page) to download the VSIX file and install it into Visual Studio.

NuGet fun

Before we can write any code we'll need some NuGet packages. Use these commands in the Package Manager Console.

Install-Package MvvmLight

Install-Package sqlite-net

Install-Package WPtoolkit

Install-Package Cimbalino.Phone.Toolkit

...Read more

You can also follow us on Twitter @winphonegeek

Comments

Source: http://feedproxy.google.com/~r/Windowsphonegeek/~3/S0ixpilMIiA/sqlite-with-a-bit-of-mvvm-light-in-windows-phone-8

donald payne elizabeth berkley lenny dykstra jenelle evans jenelle evans mlb 12 the show sabu

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.