Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 错误-找不到请求的.net framework数据提供程序_C#_Asp.net Mvc_Entity Framework_Connection String - Fatal编程技术网

C# 错误-找不到请求的.net framework数据提供程序

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

我在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 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”