简体   繁体   中英

Visual Studio template for generating LINQ to SQL classes?

I notice that my Windows Phone 8 project doesn't have the LINQ to SQL Classes template, used to generate classes mapped to relational objects and a DataContext. I've read some topics in the Windows Phone Dev Center on how to use LINQ to SQL and they make the classes manually, like in this one: How to create a local database app with MVVM for Windows Phone 8 .

This topic talks about the limitations of the Windows Phone 8 version of LINQ to SQL, but doesn't mention anything about this template. I wonder why Microsoft took it out?

Is there any other template in Visual Studio used for the same purpose?

I have used SQLite and have been very happy with it. Here is a link to a blogpost on Nokia's website detailing how to add it. (it will require you to create classes to resemble the data, but you probably want to do that anyway).

http://developer.nokia.com/community/wiki/How_to_use_SQLite_in_Windows_Phone

It's actually pretty easy once you wire the few pieces together.

I use SQL Server Compact Toolbox . It works really well - you can create tables and relations graphically, and it will create the classes and DataContext for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM