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

后端 未结 8 1332
旧时难觅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:21

    In my case I had this error because I made another partial class with the same name as the class generated by entity framework. Except mine did not matche the case. For example:

    public partial class Vehicle
    {
        public string Name { get; set; }
        public string Make { get; set; }
        ...
    }
    
    public partial class VEhicle
    {
        public override bool Equals(object obj)
        {
           ...
        }
    }
    
    0 讨论(0)
  • 2021-02-05 03:21

    In my case, the problem is because of table name conflict.

    I have another edmx model that has some tables with similar names. Just click on the table in the designer, then in the properties change the name to something different!

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