I am getting the following error when executing one one of my LINQ queries
The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type 'Product'. Previously found CLR type 'TF.MyProject.DAL.Product, newly found CLR type 'TF.MyProject.DTO.Product'.
The Entity Framework generated class and the DTO object both are under their own namespace. This has worked previously and below is what I have tried so far...
- Regenerated the EDMX Model
- Removed and Created a new EDMX Model
- Run Custom Tool to generate the Template files
- Ensure all projects within the solution are using the same Entity Framework version.
Entity Framework version: 6.1.3
Below is how my current project is set up
MyProject
- /DAL/MyProjectModel.edmx
- /DTO/Product.cs
Any idea or suggestions will be helpful. This has worked in my previous projects with version 6. Not sure if it is specific to a version within release 6..
Note: Moving the DAL to a project of its own resolves the issue