❔ EF Core 7 - FromSql join with same column names
This code produces ArgumentException -> An item with the same key has already been added. Key: CustomerId.
Is there a way to fix this query? I know that I can remove the "i"."CustomerId" and it will work but imagine that Customer and Invoice entities have property with the same name this will cause the same error
Note: I am aware that I can just use LINQ. I want to know if there is a way to fix the FromSql approach.
Is there a way to fix this query? I know that I can remove the "i"."CustomerId" and it will work but imagine that Customer and Invoice entities have property with the same name this will cause the same error
Note: I am aware that I can just use LINQ. I want to know if there is a way to fix the FromSql approach.