w*s 发帖数: 7227 | 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) | c*********e 发帖数: 16335 | 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(
|
|