简体   繁体   中英

Entity Framework multiple edmx errors

I have a data model AccordEHR in which I have multiple tables. I could easily retrieve data using one data model. I used another data model named PayCare which also has multiple tables.

Now the problem is, in PayCare , there are tables which have name exactly that as in AccordEHR table. There are similar named tables in both data models. When I created the second data model PayCare , the first data model automatically replaces its table with second data model tables which has common name.

Note that tables have similar names but the data differs.

I tried to explain it as simple as I could.

Put your models into different namespaces by separating them with folders

...
  Database
      PayCare
          PayCareEntityModel.edmx
          ...
      AccordEHR
          AccordEHR.edmx
          ...

The CommonTable class for both models are then separated into Database.PayCare.CommonTable and Database.AccordEHR.CommonTable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM