Truy vấn LINQ-to-SQL chọn trường từ khung nhìn SQL Server trong chương trình C# chạy trên cơ sở dữ liệu SQL Server 2008, chạy tốt trong môi trường dev cục bộ của tôi, tạo ra một ngoại lệ khi chạy trong môi trường dàn dựng:Điều gì có thể gây ra một EntityCommandExecutionException trong EntityCommandDefinition.ExecuteStoreCommands?
Exception Message: An error occurred while executing the command definition. See the inner exception for details.
Exception Trace: System.Data.Entity.Core.EntityCommandExecutionException
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.b__5()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1..GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at [my code ...]
Điều gì gây ra ngoại lệ này xảy ra?
Cảm ơn bạn !!! đã làm cho tôi –