×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Using a Local Database

    I need to use a database in my WP8 app and I came across some tutorials about the Local Database.

    Microsoft's tutorial requires me to build my classes by hand and this is quite hard as I've got some "complex" join tables.

    So I thought that there must be, somewhere, a tool that generates my Entities starting from a DB instance (that I created in VS2013 by making a new SQL Project and creating its .dbml file in a new Windows Form application).

    The problem is that I can't find anything that can help me with this task, and I really don't want to be forced to write the Entities by hand because it will be long and hard (I'm coming from Java & Java EE in which I had that beautiful NetBeans' class generator from DB!)

    Any suggestion?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Using a Local Database

    As I see you have certainly encountered references to LINQ for SQL. The question is: have you checked what it is? http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx is linked from the "local database" pages, but for getting "real" impressions about it, you may want to check http://msdn.microsoft.com/en-us/library/bb386976.aspx

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    548

    Re: Using a Local Database

    Although there is the built-in SQL CE, SQLite is the more modern choice. There are few tutorial that show you what to download and how to set it up. There's also a plugin that allows you to use Linq which means you're interacting with database like an ORM would...

    http://developer.nokia.com/Community..._Windows_Phone

    http://social.technet.microsoft.com/...plication.aspx

  4. #4
    Registered User
    Join Date
    Sep 2013
    Posts
    45

    Re: Using a Local Database

    I've tried with SQLMetal (following wizard_hu's links) and it seem to create my entities but it generated almost 1200 lines of code for just 3 tables and I find it quite strange.
    @theothernt: I know that I can use SQLite, and I'd really like to, but my problem is that I want to work with Entities and all the ORM stuff without having to write my Entities by hand! Is there any tool that build the Entities starting from the SQLite file?

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Using a Local Database

    As SqlMetal is an external tool, most likely it generates code for all possible operations you could do with those tables. It does not mean that every line of code will reach your actual executable.
    Think about the generated code as a library.

Similar Threads

  1. local sql database storage
    By deanchalk in forum Mobile Java General
    Replies: 1
    Last Post: 2013-05-10, 10:22
  2. How to use local database in N9 application
    By rhythmkay in forum Nokia N9
    Replies: 3
    Last Post: 2012-10-18, 15:33
  3. few mixed queries on local sms and database
    By yahoo2010 in forum Symbian
    Replies: 9
    Last Post: 2010-08-22, 16:49
  4. local database for application on N95 mobile
    By burinutit in forum Mobile Java General
    Replies: 7
    Last Post: 2010-06-05, 07:52
  5. Opening a local database file
    By ppezziardi in forum Mobile Java General
    Replies: 4
    Last Post: 2003-05-08, 14:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×