JulieLerman, on 26 December 2011 - 06:19 PM, said:
Hi, I'm looking at your code and looking at my code file open in visual studio which has no problem compiling. I even commented out my code and copy/pasted yours into the file and still have no problem.
I commented out a few of my using namespace directives but could not get your error.
So...are you sure your model is correct? Did intellisense help you build this query or did you copy paste from a digital copy? I suspect that the message saying that context does not have an Addresses property may be telling you exactly what the problem is.
Julie
Julie
Thanks a lot for you interest and you help, as I indicated to other member of the forum (
WhiskeyRomeoLima ) I guess my model is ok.
I tried to follow the directions you indicated in the book.
I was able to generate the model (
Model1.edmx) by using the wizard. I got the
Contact, Address and
vOfficeAddresses entities correctly.
In the properties windows I have:
Entity Set Name = Contacts for the Contact Entity
Entity Set Name = Addresses for the Address Entity
Entity Set Name = vOfficeAddresses for the vOfficeAddresses Entity
I was able to generate also the UML Class diagram
(ClassDiagram1.cd) via right clicking / view class diagram on Model1.Designer.cs in the solution explorer.
In the diagram I got the
SampleEntities, Address, Contact and
vOfficeAddresses classes
And before this exercise all the other code samples I was able to compile the correctly. I´m using Entity Framework 4.1
Do you have an idea what am I missing?
Regards
Carlos