Solved

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

Posted on 2013-06-22
4
1,323 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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