user1516781
user1516781

Reputation: 983

DataBase for Metro style apps in windows 8 Development?

Hi i am developing a metro style application where i will be connecting to web services and get the data from the web service and i will be binding it to the UI.

But my requirement is in my application i need to create tables and also provide relation between the tables and dump the data in to that local database and use that data in calling the other methods present in my service application (calling one more method in services by passing something as an input to that).

Can you please explain me the following :-

What is Database which is supported for metro style apps?

How can i create a database and create tables and dump the the data which i got as the response from my service application?

I am new to Metro style application development please help me out .

Thanks in Advance.

Upvotes: 3

Views: 4987

Answers (4)

Peter R
Peter R

Reputation: 364

If you're building some application that has to keep working without any network connection, and needs to synchronize at some point in time, it is necessary to keep a local database.

You can read the following article, which has some basic guidelines and samples.

http://blogs.msdn.com/b/win8devsupport/archive/2013/01/10/using-database-in-windows-store-apps-i.aspx

Upvotes: 0

Devart
Devart

Reputation: 121922

We recommend using SQLite database with LinqConnect - Devart's LINQ to SQL compatible solution which supports SQLite engine (provided by http://code.google.com/p/csharp-sqlite/). You can employ LINQ and ADO.NET interfaces with our product. Starting from the 4.0 version, LinqConnect supports Windows Metro applications: http://blogs.devart.com/dotconnect/linqconnect-for-metro-quick-start-guide.html.

Upvotes: 0

Iris Classon
Iris Classon

Reputation: 5842

What Fixus said is correct. Personally , since my app doesnt have a large amount of data to store locally (it goes against the Metro guidelines to store large amounts of data) I serialize the objects instead to local storage. When needed, and if internet is available, the services will be called and the local data updated.

If you choose to use SQLlite make sure you use the real deal and not a third party db, as the DB library must be approved by Microsoft if you want to get the app accepted to the windows store. I'm not even sure that SQLite is yet approved, but by the looks of it they will be.

Tim Heuer always writes great articles on the subject, this one might help you

Let me know if you need help with serializing in WinRT, if you need it.

Best of luck!

Upvotes: 2

Fixus
Fixus

Reputation: 4641

First of all WinRT has very poor db support. Most of this kind of things are done by web services, OData etc

BUT I`m almost 100% sure that you can use SQLite. On codeplex there are connectors from Win8 Metro app to SQLite DB so check this topic. I also saw somewhere on MS page that SQLite is support in some way. Check it

Upvotes: 3

Related Questions