开发者

The EntitySet name 'AtlanticBioContext.CompanyCustomers' could not be found

开发者 https://www.devze.com 2023-04-04 17:10 出处:网络
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 followi

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. 开发者_运维问答

0

精彩评论

暂无评论...
验证码 换一张
取 消