Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

EF 6.1.X blows up - schema is not valid / the relationship was not loaded because the type BTModel.Provider is not available

$
0
0

Added a column to my Provider table call ppPaymentProfile. It is not a foreign key, so relationships were not modified.

Open Model.edmx and selected Update Model from Database

SAVE

BUILD ==> all is well.

During debugging it blows up on this:

var theProvider = dbContext.Providers
                .Include("ProviderServices")
                .Include("ShoeInventories")
                .Where(p => p.ProviderId == providerid).FirstOrDefault();

Schema specified is not valid. Errors:
The relationship 'BTModel.FK_Appointments_Providers' was not loaded because the type 'BTModel.Provider' is not available.
The following information may be useful in resolving the previous error:
The required property 'ppPaymentProfile' does not exist on the type 'Provider'.

The list of errors is ginormous, there is one entry for each of my tables that looks like the above.

Ok, it doesn't like ppPaymentProfile (bit)

In the Model.edmx diagram I can see the column.

A search for ppPaymentProfile through the entire solution shows:

C:\Users\source\Repos\B\Website\App_Code\Model.edmx(694): <Property Name="ppPaymentProfile" Type="bit" />
C:\Users\source\Repos\B\Website\App_Code\Model.edmx(4106): <Property Name="ppPaymentProfile" Type="Boolean" />
C:\Users\source\Repos\B\Website\App_Code\Model.edmx(7549): <ScalarProperty Name="ppPaymentProfile" ColumnName="ppPaymentProfile" />

Not understanding what is going on here


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>