boa noite,
estou com problema não consigo me conectar ao banco de dados.
está dando erro no Controler Fabricantes
using Projecto01.Contexts;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
namespace Projecto01.Controllers
{
public class FabricantesController : Controller
{
private EFContext context = new EFContext();
// GET: Fabricantes
public ActionResult Index()
{
return View(context.Fabricantes.OrderBy(
c=> c.Nome));
}
}
}
erro:
An exception of type ‘System.ArgumentException’ occurred in EntityFramework.dll but was not handled in user code
Additional information: The ADO.NET provider with invariant name ‘System.DataSqlClient’ is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
A baixo segue a connection string.
<add name="Asp_net_MVC_CS" connectionString="Data Source=(localdb)\MSSQLLocalDB;AttachDbFileName=|DataDirectory|\Asp_Net_MVC_DB.mdf;Integrated Security=True;MultipleActiveResultSets=True;" providerName="System.DataSqlClient" />