每当我将更改保存到我的屏幕时,就会出现此错误。我做的最后一件事是在 WCF RIA 服务中创建关系。我查看了所有异常信息,并尝试在调试器中单步执行我的代码,直到它被抛出之前,都没有结果。'name' 引用没有用,我评论了引用'name' 的每一段代码。它似乎是那些几乎没有告诉你这个问题的例外之一。
[Microsoft.LightSwitch.DataService][Application:Error][LightSwitchServiceApplication.WCF_RIA_ServiceData:SaveChanges] An exception has occurred: Microsoft.LightSwitch.DataServiceOperationException: Invalid argument 'name' ---> System.ArgumentException: Invalid argument 'name'
at Microsoft.LightSwitch.Platform.Utilities.Internal.Parameter.ThrowArgumentException(String parameterName)
at Microsoft.LightSwitch.Details.Framework.Base.DetailsSet`3.GetItemCore(String name)
at Microsoft.LightSwitch.Details.Framework.Base.DetailsSet`1.get_Item(String name)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.RiaDataProvider.HandleErrors(ChangeSet changeSet, List`1 entityPairs)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.RiaDataProvider.SubmitCore(IEnumerable`1 changes)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataProvider.DataProvider.Submit(IEnumerable`1 changes)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.PerformPersistCore(IEnumerable`1 eventsChangeSetItems)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.<>c__DisplayClass46.<PerformPersist>b__45()
at Microsoft.LightSwitch.Threading.DualDispatcherObject.Mutate(IDispatcher logicDispatcher, MutatorHost host, Action mutator)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.PerformPersist(IEnumerable`1 eventsChangeSetItems)
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.Microsoft.LightSwitch.ServerGenerated.Implementation.IServerDataServiceImplementationCore.Submit()
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataService`1.<>c__DisplayClass12.<Microsoft.LightSwitch.ServerGenerated.Implementation.IODataService.SaveChanges>b__10()
at Microsoft.LightSwitch.ServerGenerated.Implementation.DataServiceImplementation`1.InvokeOperationCore[T](String operationName, Object[] args, Boolean invokedFromODataClient, Func`1 invokeOperation, Action catchCallback, Action`2 serializeCustomExceptionInfo)
--- End of inner exception stack trace ---