Visual Studio 2015 provider issues when manipulating SQLite databases using EF6 's Codefirstfromdb mode

Source: Internet
Author: User
Tags sqlite stack trace connectionstrings

What is Codefristfromdb

  

Problem: Query data is encountered

Server error in "/" application. No Entity Framework provider found for the ADO provider with invariant name ' System.Data.SQLite '. Make sure the provider are registered in the ' EntityFramework ' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code. Exception Details: System.InvalidOperationException:No Entity Framework provider found for the ADO provider with invariant name ' System.Data.SQLite '. Make sure the provider are registered in the ' EntityFramework ' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

Solution Solutions

<?xml version= "1.0" encoding= "Utf-8"?><!--For more information about how to configure an ASP. NET application, go to http://go.microsoft.com/fwlink/? linkid=169433--><configuration> <configSections> <!--for more information on Entity Framework con figuration, visit http://go.microsoft.com/fwlink/? linkid=237468--<section name= "EntityFramework" type= " System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, version=6.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "requirepermission=" false "/> </configSections> <system.web> < Compilation debug= "True" targetframework= "4.0"/> </system.web> <entityFramework> <defaultconnecti Onfactory type= "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, entityframework" > <parameters > <parameter value= "v13.0"/> </parameters> </defaultConnectionFactory> <provide Rs> <!--Original--<provider INVARIANTNAme= "System.Data.SqlClient" type= "System.Data.Entity.SqlServer.SqlProviderServices, Entityframework.sqlserver"/ > <provider invariantname= "System.Data.SQLite.EF6" type= "System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6 "/> <!--needs to be added--<provider invariantname=" System.Data.SQLite "type=" System.da Ta. SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6 "/> </providers> </entityFramework> < system.data> <DbProviderFactories> <remove invariant= "System.Data.SQLite.EF6"/> <add name= "SQLite Data Provider (Entity Framework 6)" invariant= "System.Data.SQLite.EF6" description= ". NET Framework Data Provider For SQLite (Entity Framework 6) "Type=" System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6 "/> &L T;remove invariant= "System.Data.SQLite"/> <add name= "SQLite Data Provider" invariant= "System.Data.SQLite" desc Ription= ". NET Framework Data Provider for SQlite "Type=" System.Data.SQLite.SQLiteFactory, System.Data.SQLite "/> </DbProviderFactories> </ system.data> <connectionStrings> <add name= "jianboshicontent" connectionstring= "Data source=c:\users\ Shihao\desktop\webapplication1\webapplication14\app_data\jianboshi.db "Providername=" System.Data.SQLite.EF6 "/ > </connectionStrings></configuration>

  

Visual Studio 2015 provider issues when manipulating SQLite databases using EF6 's Codefirstfromdb mode

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.