The entity type Type is not part of the model for the current context
修正連線字串 edmx metadata 的 csdl、ssdl 和 msl 對應 DbContext 就解決該問題
<connectionStrings>
<add name="CustomDbContext"
connectionString="
metadata=
res://*/DbContext.CustomDbContext.csdl|
res://*/DbContext.CustomDbContext.ssdl|
res://*/DbContext.CustomeDbContext.msl;
provider=System.Data.SqlClient;
provider connection string="
data source=.\SQLInstance;
initial catalog=DBName;
User Id=UserID;
Password=PWD;
integrated security=False;
multipleactiveresultsets=True;
application name=EntityFramework""
providerName="System.Data.EntityClient"/>
</connectionStrings>
沒有留言:
張貼留言