Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-06-22
4
Medium Priority
?
1,387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Cloud Training Guides

FREE GUIDES: In-depth and hand-crafted Linux, AWS, OpenStack, DevOps, Azure, and Cloud training guides created by Linux Academy instructors and the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

661 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