asp.net mvc - Entity Framework: LINQ Include() does not work after DB update, why? -


I'm new to the unit framework and LINQ and went into a strange scenario.

I have been using the following question to return the account information:

  var account = (acct at _entities.account from _entities.account at ACT On iDem, m.Account.Id is equal to where acct. Id == account id & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp ;IMI (item number) select acct) & lt; account & Please include ("Item.ItemDetails");  

We've recently made some changes to the database and created a new ADMX file. The open query still returns the account and related items but the item is not being included anymore.

I have certified SQL with the query and there is nothing wrong in it, the correct data is being returned.

In addition to these items I do not see anything different in the edmx file between the items and the items as these were the change and the navigation property is there.

< P> Thanks

Include (...) the name of the navigation property is used, so it would be good to check the correct name of the property from .edmx (especially if it is singular or plural).

In addition to this you can try to change the query:

  var account = _entities.Account.Include ("Item.ItemDetails") from MTCT MTNTT The item on the item is equal. Account.id where acct id == A ccountId & amp; Amp; Select M.ItemNumber.EndWith (itemNumber) acct;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -