O'Reilly Forums: 2Nd Edition : Example 13-3 [Page 341] Throws An Exception - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2Nd Edition : Example 13-3 [Page 341] Throws An Exception

#1 User is offline   Ravanan 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 04-February 13

Posted 05 February 2013 - 12:11 AM

In the Creating POCO classes section [Chapter 13] example 13-3 on page 341 throws an exception at the following statements(in the Entities constructor)

_contacts = CreateObjectSet<Contact>();
_address = CreateObjectSet<Address>();

This is the exception I got:

MetadataException was unhandled

Schema specified is not valid. Errors:
The relationship 'PROGRAMMINGEFDB1Model.FK_Address_Contact' was not loaded because the type 'PROGRAMMINGEFDB1Model.Address' is not available.
The following information may be useful in resolving the previous error:
The required property 'addressID' does not exist on the type 'POCOTest.Address'.
0

#2 User is offline   JulieLerman 

  • Advanced Member
  • PipPipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 334
  • Joined: 17-September 08

Posted 02 December 2013 - 06:26 PM

I can't duplicate this problem. The 13-4 code that uses the 13-3 context runs as expected. The best suggestion I can make is download the chapter 13 sample from learnentityframework.com/downloads and compare to what you've got.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users