0
votes

I am using ADO.NET LinqtoSql for populating data into SqlDatabase tables after parsing from flat files using LINQ. I am also using an Entity Data Model in the same project for displaying those Populated SqlDatabase tables in a JQGrid.

Entity Data Model is used to select datasets from multiple columns from multiple SqlDatabase tables using LINQ.

Exceptions and Errors obtained:

Ambiguity between 'TABLE.TABLEONE.FileCreated' and 'TABLE.TABLEONE.FileCreated' 

The type 'TABLE.TABLEONE' already contains a definition for 'Tableone_ID'   

I am able to rectify these errors if the definitions declared in the ADO.NET Entity Model.edmx design are renamed to a different name.

How to resolve the exceptions without changing the definitions and proceed with our development. Help needed.

1
It's impossible to help if we don't see the code that throws the exceptions. I think EF and linq-to-sql generated the same class names. - Gert Arnold
@GertArnold: Edited with sample code as requested. - Shrivatsan
Did you check the class names? You have to rename one of them. - Gert Arnold
@GertArnold : The DBML also generates TABLETWO class name in LINQ and EDMX also generates TABLETWO in autogenerated file. Both referrring to same tables in DB Design. - Shrivatsan
@GertArnold +1 for changing class names. I changed the class names in my DBML design. It worked. - Shrivatsan

1 Answers

0
votes

Fixed the conflicts of the definitions and ambiguity between DBML and EDMX design. Renamed the class names of DBML as TABLEONE_DBML and it worked well for EDMX.