Go Premium for a chance to win a PS4. Enter to Win

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,406 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 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

773 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