Pits-DB first development using entity Framework 6 + SQLite

Source: Internet
Author: User
Tags sqlite sqlite database

SQLite team is also slag Ah, to the 6th generation has not supported code first.

  1. Install the operating environment and components

    1 . Install S Qlite Visual Studio Designer support

    Only if you have it installed, you will have SQLite's data source options when you create the new ADO Entity Data Model. My environment is 64-bit +vs2013, here is the use of VS2013, corresponding to the Sqlite-netfx451-setup-bundle-x86-2013-1.0.98.0.exe.

What the? Why do I download X86? Because I found X64 missing some options (Install the Desgner components for VS2013), the X86 version is complete. Of course it may be because my vs is 32-bit. Here if you are using VS2012, there is a corresponding version, more versions please visit: Http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki.

The installation process is as follows:

The first step is to select Install all

    

Be sure to select the option above, Next

       

    The process is a little long, about 3-5 minutes.

       

The installation will pop up and the point can be completed.

2. Install the SQLite component in the project (using NuGet)

Open the VS menu in turn: Tools + NuGet Package Manager--The NuGet package for managing solutions.

Search SQLite, click Install, show Green title indicates that the installation has been successful.

    

2. Demonstration

     After the installation is complete, follow the steps: "New + = ADO." NET Entity Data model and the EF designer from the database = + New Connection ",

You can see the option to increase the SQLite database source. The VS Designer support must be installed before it comes out because NuGet has helped us add SQLite provider to the config file.

      

      

Oh, forgive me is retina screen, forgive me to install Windows with Mac.

In this step, you can select and create a SQLite database file.

     

Generated model diagram, EDMX file

    

PostScript: Third party has the components that support SQLite Code first, interested in the pot friends can understand: Https://github.com/msallin/SQLiteCodeFirst

Pits-DB first development using entity Framework 6 + SQLite

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.