Schema specified is not valid. Errors: The relationship was not loaded because the type is not available

后端 未结 8 1329
旧时难觅i
旧时难觅i 2021-02-05 02:53

I wish to reference the OrderAddress model twice in my Order model; once as a ShippingAddress and once as a Billing

8条回答
  •  忘了有多久
    2021-02-05 03:02

    I got the same error using database first: "The relationship was not loaded because the type ... is not available". The problem was the model in the solution was outdated. To fix the problem:

    • Double click on edmx file under Solution.
    • Right click on it.
    • Select "Update Model from Database...".
    • Click on the "Refresh" tab.
    • Click on the Finish button.

    Your edmx now should be updated with the latest database changes.

提交回复
热议问题