找不到“ EntityName:#xx.xx.xx.xx.xx”用微风保存更改。 [英] Save Changes with breeze Assembly could not be found for EntityName:#xx.xx.xx.xx.xx"
问题描述
保存更改时,发生以下异常:
找不到EntityName的组件:#xx.xx.xx.xx.Entities
When saving changes, the follow Exception occurs: "Assembly could not be found for EntityName:#xx.xx.xx.xx.Entities"
堆栈的前3行:
-
在Breeze.ContextProvider .ContextProvider.LookupEntityType(String entityTypeName)
at Breeze.ContextProvider.ContextProvider.LookupEntityType(String entityTypeName)
at Breeze.ContextProvider.SaveWorkState。< .ctor> b__8(IGrouping`2 g)
at Breeze.ContextProvider.SaveWorkState.<.ctor>b__8(IGrouping`2 g)
JS:
function remove(entity) {
entity.entityAspect.setDeleted();
return this.manager
.saveChanges()
.then(ok, ko);
}
是什么原因导致此问题?
What can be causing this issue?
推荐答案
如果Breeze ContextProvider找不到您所需要的实体类型的服务器端类,则会发生该异常正在尝试保存。
That exception happens if the Breeze ContextProvider cannot find a server-side class for the entity type you are trying to save.
在客户端上调用 manager.saveChanges
时,每个实体的JSON均包含 entityTypeName
属性的> entityAspect 对象,该属性是实体的完全合格的类名称。
When manager.saveChanges
is called on the client, the JSON for each entity includes an entityAspect
object with an entityTypeName
property that is the fully-qualified class name of the entity. This tells the server how to materialize the entity.
在您的情况下,服务器上没有与 entityTypeName $ c $匹配的类。 c>您的客户正在发送。
In your case, there is no class on the server matching the entityTypeName
that your client is sending.
这篇关于找不到“ EntityName:#xx.xx.xx.xx.xx”用微风保存更改。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!