I have multiple EDMX files in same project. All files targeting same database.
Table 'Customers' occurred two times but in different EDMX files.
Is there way to use classes with same names in different EDMX files?
My code:
using (var con = new TestEntities())
{
var q1 = con.ADDRESS.ToList();
foreach (var item in q1)
{
Console.WriteLine(item.CITY);
}
}
using (var con2 = new TestEntities1())
{
var q2 = con2.ADDRESS.ToList();
foreach (var item in q2)
{
Console.WriteLine(item.CITY);
}
}
On second query "q2" I get error: The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type.
First works normally.
Thanks