Redian新闻
>
新人再问 sql/linq: No connection string name d 'db5Entities' could be found in the application config fi
avatar
新人再问 sql/linq: No connection string name d 'db5Entities' could be found in the application config fi# DotNet - 窗口里的风景
w*s
1
1. in F:charp, i have my c# application project, and a DB file called db5.
mdx
2. in my c# project i uses this db5.mdx, using EF
3. now i copied the exe built from c# project to another folder and run it,
and got this, any hints pls ?
Unhandled Exception: System.InvalidOperationException: No connection string
name
d 'db5Entities' could be found in the application config file.
at System.Data.Entity.Internal.LazyInternalConnection.get_
ConnectionHasModel(
)
at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
at System.Data.Entity.Internal.InternalContext.
GetEntitySetAndBaseTypeForType
(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get
_Pro
vider()
at System.Linq.Queryable.Any[TSource](IQueryable`1 source, Expression`1
predi
cate)
at StockAnalyze.Analyze.ProcessRawStockData(String stock, Int32 mv_days,
Int3
2 p_days)
avatar
c*e
2
web.config里没有這個connection name.

string

【在 w*s 的大作中提到】
: 1. in F:charp, i have my c# application project, and a DB file called db5.
: mdx
: 2. in my c# project i uses this db5.mdx, using EF
: 3. now i copied the exe built from c# project to another folder and run it,
: and got this, any hints pls ?
: Unhandled Exception: System.InvalidOperationException: No connection string
: name
: d 'db5Entities' could be found in the application config file.
: at System.Data.Entity.Internal.LazyInternalConnection.get_
: ConnectionHasModel(

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。