Solved

EntitySet 'WBF_DataEntities' that was specified in page markup does not exist on the Container

Posted on 2013-06-22
4
1,311 Views
Last Modified: 2013-06-23
Hi,

I am trying to connect an EntityDataSource to an Entity Framework Model.  When I enter "WBF_DataEntities" for the DefaultContainerName I get the error

EntitySet 'WBF_DataEntities' that was specified in page markup does not exist on the Container

I am fairly sure, although I certainly could be wrong, the the container name is WBF_DataEntities.  The namespace for the data model is WBF_DataModel.  I tried using this but I get the error

The specified default EntityContainer name 'WBF_DataModel' could not be found in the mapping and metadata information.
Parameter name: defaultContainerName

I will be happy to upload any code that you need to look at.  I just don't know exactly what someone needs to see to try to help me with this problem.  I have spent the last three hours researching on the Internet and have not been able to find a solution.

Thanks,

Doug
0
Comment
Question by:DLAtkinson
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:lenordiste
ID: 39269165
have you tried "WBF_DataEntity" by any chance?

send us your .edmx file and the problematic page markup so we can help you out.
0
 

Author Comment

by:DLAtkinson
ID: 39269392
No, hadn't tried WBF_DataEntity, so tried it and received

The specified default EntityContainer name 'WBF_DataEntity' could not be found in the mapping and metadata information.
Parameter name: defaultContainerName

Per your request I have attached the .edmx file (I had to add a .txt extension to it becuase EE would not let me upload it with the edmx extension) and problematic page along with a couple of others just in case.

Thanks,

Doug
Whats-New.aspx
Whats-New.aspx.cs
WBFModel.Designer.cs
WBFModel.edmx.txt
0
 
LVL 11

Accepted Solution

by:
lenordiste earned 500 total points
ID: 39269528
I am a bit rusty with EF... That said i believe your container name is WBF_DataEntities but it's the EntitySetName which is wrong. What are you trying to display with that EntityDataSource? If it is "newsletters", do this for example:

 
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
         ConnectionString="name=WBF_DataEntities"
        DefaultContainerName="WBF_DataEntities"
        EnableFlattening="false"
        EntitySetName="NewsLetters"
         OnQueryCreated="EntityDataSource1_QueryCreated">
    </asp:EntityDataSource>

Open in new window


Also, did you try doing this through the wizard? It will give you all possible values in a drop down which can be less of an hassle :-)
0
 

Author Closing Comment

by:DLAtkinson
ID: 39269884
That did it.  Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now