C# 错误-找不到请求的.net framework数据提供程序
我在stack overflow和web上都找到了大量关于这个主题的信息,但似乎都没有帮助C# 错误-找不到请求的.net framework数据提供程序,c#,asp.net-mvc,entity-framework,connection-string,C#,Asp.net Mvc,Entity Framework,Connection String,我在stack overflow和web上都找到了大量关于这个主题的信息,但似乎都没有帮助 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace GeoCode.Models { public class ad
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
namespace GeoCode.Models
{
public class address
{
[Key]
public int ARENA_ID { get; set; }
public string ADDRESS1 { get; set; }
public string CITY { get; set; }
public string ZIP { get; set; }
public decimal COUNTRY { get; set; }
}
public class latlng
{
[Key]
public int ARENA_ID { get; set; }
public string LAT { get; set; }
public string LNG { get; set; }
}
public class GeoCodeDBContext : DbContext
{
public DbSet<address> WEB_ARENA { get; set; }
public DbSet<latlng> WEB_ARENA_GEO { get; set; }
}
}
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用System.Web;
使用System.Data.Entity;
使用System.ComponentModel.DataAnnotations;
命名空间GeoCode.Models
{
公共课堂演讲
{
[关键]
公共int ARENA_ID{get;set;}
公共字符串地址1{get;set;}
公共字符串CITY{get;set;}
公共字符串ZIP{get;set;}
公共十进制国家{get;set;}
}
公共级车床
{
[关键]
公共int ARENA_ID{get;set;}
公共字符串LAT{get;set;}
公共字符串LNG{get;set;}
}
公共类GeoCodeDBContext:DbContext
{
公共数据库集WEB_ARENA{get;set;}
公共数据库集WEB_ARENA_GEO{get;set;}
}
}
当我使用该模型使用entity framework创建一个具有读/写操作和视图的类时,会出现错误,“找不到请求的.net framework数据提供程序。它可能未安装。”
我的连接字符串是:
<add name="GeoCodeDBContext"
connectionString="server=********;database=*****;uid=*****;pwd=******"
providerName="System.Data.SqlServer"/>
提供程序
providerName=“System.Data.SqlServer”
不存在。它应该是providerName=“System.Data.SqlClient”
请参阅上的文档。知道
System.Data.SqlClient
实际上是默认值可能会很好,因此您甚至不需要为providerName
提供程序提供值providerName=“System.Data.SqlServer”
不存在。它应该是providerName=“System.Data.SqlClient”
请参阅上的文档。知道
System.Data.SqlClient
实际上是默认值可能会很好,因此您甚至不需要为providerName
提供程序提供值providerName=“System.Data.SqlServer”
不存在。它应该是providerName=“System.Data.SqlClient”
请参阅上的文档。知道
System.Data.SqlClient
实际上是默认值可能会很好,因此您甚至不需要为providerName
提供程序提供值providerName=“System.Data.SqlServer”
不存在。它应该是providerName=“System.Data.SqlClient”
请参阅上的文档。如果知道
System.Data.SqlClient
实际上是默认值,那么您甚至不需要为providerName
提供一个值,因为您在连接字符串中指定了错误的提供程序System.Data.SqlServer
不是提供程序。请尝试以下方法:
<add name="GeoCodeDBContext"
connectionString="..."
providerName="System.Data.SqlClient"/>
您在连接字符串中指定了错误的提供程序
System.Data.SqlServer
不是提供程序。请尝试以下方法:
<add name="GeoCodeDBContext"
connectionString="..."
providerName="System.Data.SqlClient"/>
您在连接字符串中指定了错误的提供程序
System.Data.SqlServer
不是提供程序。请尝试以下方法:
<add name="GeoCodeDBContext"
connectionString="..."
providerName="System.Data.SqlClient"/>
您在连接字符串中指定了错误的提供程序
System.Data.SqlServer
不是提供程序。请尝试以下方法:
<add name="GeoCodeDBContext"
connectionString="..."
providerName="System.Data.SqlClient"/>
应该是providerName=“System.Data.SqlClient”
应该是providerName=“System.Data.SqlClient”
应该是providerName=“System.Data.SqlClient”
应该是providerName=“System.Data.SqlClient”