Save Changes with breeze Assembly could not be found for EntityName:#xx.xx.xx.xx.xx"

ⅰ亾dé卋堺 提交于 2019-12-25 16:35:52

问题


When saving changes, the follow Exception occurs: "Assembly could not be found for EntityName:#xx.xx.xx.xx.Entities"

First 3 lines of Stack:

  • at Breeze.ContextProvider.ContextProvider.LookupEntityType(String entityTypeName)

  • at Breeze.ContextProvider.SaveWorkState.<.ctor>b__8(IGrouping`2 g)

  • at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()

JS:

function remove(entity) {
    entity.entityAspect.setDeleted();

    return this.manager
        .saveChanges()
        .then(ok, ko);
}

What can be causing this issue?


回答1:


That exception happens if the Breeze ContextProvider cannot find a server-side class for the entity type you are trying to save.

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.

In your case, there is no class on the server matching the entityTypeName that your client is sending.



来源:https://stackoverflow.com/questions/31954460/save-changes-with-breeze-assembly-could-not-be-found-for-entitynamexx-xx-xx-xx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!