Solved

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

Posted on 2013-06-22
4
1,293 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
That did it.  Thanks.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

10 Experts available now in Live!

Get 1:1 Help Now