The EntitySet name 'AtlanticBioContext.CompanyCustomers' could not be found
I am working on a project tied to a SQL 2000 server which the client cannot change at this time. With edmgen2.exe I was able to create a edmx file for VS2010. However, when I attempt to make the following call:
CompanyCustomer customer = ctx.CompanyCustomers.Where(o => o.Company_id == "77151").Single <CompanyCustomer>();
I get the following exception: The EntitySet name 'AtlanticBioContext.CompanyCustomers' could not be found. I have checked the edmx file and it looks like the EntitySet is defined there:
<edmx:ConceptualModels>
<Schema Namespace="AtlanticBio" Alias="Self" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityContainer Name="AtlanticBioContext">
<EntitySet Name="CompanyCustomers" EntityType="AtlanticBio.CompanyCustomer" />
<EntitySet Name="CUSTOMER" EntityType="AtlanticBio.Customer" />
<EntitySet Name="Products" EntityType="AtlanticBio.Products" />
I have googled the error above to attempt to get an idea of how EF defines the set above, but I have not been able to find much. Any help is appreciated. 开发者_运维问答
精彩评论