我继续使用内部异常
获取EntityException{"无法打开数据库\" Namespace.Model.DbContext \"要求的 登录。登录失败用户' Domain \ myusername'登录失败。"}
我显然已经重命名了doman和用户名以及命名空间模型和继承的dbcontext类名。
疑似故障1,连接字符串:
<add name="Connection2"
connectionString="
Data Source=(LocalDB)\v11.0;
Database=EmployeeDB;
Integrated Security=True" />
疑似错误2,代码:
List<Employee> employees = employeeContext.Employees.ToList();
答案 0 :(得分:1)
答案 1 :(得分:1)
我认为事实证明我使用的是实体框架但没有提供providerName="System.Data.SqlClient"