Entity framework metadata exception - No csdl, ssdl, msl in dll resources

前端 未结 1 1849
情歌与酒
情歌与酒 2021-01-14 02:20

I have DAL (model first entity framework 4.1) and Service which is using it in separate projects. Everything was working fine, but after some minor changes (for example I g

相关标签:
1条回答
  • 2021-01-14 02:58

    The standard metadata string looks like this:
    metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl
    And this works fine in most cases. However, in some Entity Framework get confused and does not know which dll to look in. Therefore, change the metadata string to:
    metadata=res://nameOfDll/Model.csdl|res://nameOfDll/Model.ssdl|res://nameOfDll/Model.msl

    0 讨论(0)
提交回复
热议问题