0
不知道爲什麼我得到這個錯誤。這是一個練習代碼,所以我學習了實體框架代碼的第一種方法。實體框架代碼第一個錯誤
我在web.config
<add name="CompanyDBContext"
connectionString="server=.; database=CompanyDB;integrated security=true;"
providerName="System.Data.SqlClient"/>
<connectionStrings>
及以下類以下
public class CompanyDBContext: DbContext
{
public DbSet<Department> Departments { get; set; }
public DbSet<Employee> Employees { get; set; }
}
的錯誤是:提前
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
謝謝!