测试期间BreezeJS DocCode失败

时间:2014-05-22 21:38:39

标签: c# breeze

使用VS 2013运行DocCode示例的最新示例代码。下面出现以下错误。 有什么想法吗?我的目标是调试localstorage和IndexedDB,并在此测试期间查看调试器中发生的情况。我需要提供概念证明,并确保BreezeJS可以正确使用IndexedDB存储。

System.Exception未被用户代码处理   的HResult = -2146233088   Message =存储更新,插入或删除语句影响了意外的行数(0)。自实体加载后,实体可能已被修改或删除。刷新ObjectStateManager条目。   来源= Breeze.ContextProvider.EF6   堆栈跟踪:        在Breeze.ContextProvider.EF6.EFContextProvider 1.SaveChangesCore(SaveWorkState saveWorkState) at Breeze.ContextProvider.ContextProvider.OpenAndSave(SaveWorkState saveWorkState) at Breeze.ContextProvider.ContextProvider.SaveChanges(JObject saveBundle, TransactionSettings transactionSettings) at DocCode.DataAccess.TodosRepository.SaveChanges(JObject saveBundle) in c:\Users\username\Downloads\breeze-runtime-plus-1.4.12\Samples\net\DocCode\DocCode.DataAccess.EF\TodosRepository.cs:line 27 at DocCode.Controllers.TodosController.SaveChanges(JObject saveBundle) in c:\Users\username\Downloads\breeze-runtime-plus-1.4.12\Samples\net\DocCode\DocCode\Controllers\TodosController.cs:line 30 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary 2个参数,CancellationToken cancellationToken)   InnerException:System.Data.Entity.Infrastructure.DbUpdateConcurrencyException        的HResult = -2146233087        Message =存储更新,插入或删除语句影响了意外的行数(0)。自实体加载后,实体可能已被修改或删除。刷新ObjectStateManager条目。        来源=的EntityFramework        堆栈跟踪:             在System.Data.Entity.Internal.InternalContext.SaveChanges()             在System.Data.Entity.Internal.LazyInternalContext.SaveChanges()             在System.Data.Entity.DbContext.SaveChanges()             在Breeze.ContextProvider.EF6.EFContextProvider 1.SaveChangesCore(SaveWorkState saveWorkState) InnerException: System.Data.Entity.Core.OptimisticConcurrencyException HResult=-2146233087 Message=Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries. Source=EntityFramework StackTrace: at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ValidateRowsAffected(Int64 rowsAffected, UpdateCommand source) at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut) at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func 2 updateFunction,Boolean throwOnClosedConnection)                  在System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update(Boolean throwOnClosedConnection)                  在System.Data.Entity.Core.Objects.ObjectContext.b__33()                  在System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction [T](Func 1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy) at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass28.<SaveChanges>b__25() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func 1操作)                  在System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions选项)                  在System.Data.Entity.Internal.InternalContext.SaveChanges()             InnerException:

1 个答案:

答案 0 :(得分:0)

我可以在saveConcurrentlyTests - SaveQueuing文件中的saveConcurrentlyTests.js测试模块中看到此异常。预期并发异常,因为这是测试的目的。该模块中的所有5个测试仍然通过。

如果这与您观察到的不同,请告诉我。