Open AndriySvyryd opened 2 years ago
There is an alternative solution? My domain has many entities and I have more than 400 conflicts
There is an alternative solution? My domain has many entities and I have more than 400 conflicts
Workaround is mentioned here: https://github.com/dotnet/efcore/issues/25523#issuecomment-902836615
Adding a note to help me find this in the future; fully-qualified typed for compiled model. :-)
Just because I just saw this: should we maybe consider just always fully-qualifying? I think that's generally consider best practice in generated code (dealt with some similar issues in precompiled queries), and there's no real downside except more verbose generated code, which nobody cares about...
should we maybe consider just always fully-qualifying?
Sure and we can add an opt-out instead
FWIW it seems to be standard practice (e.g. in source generators) for generated code to just always be fully-qualified (including the global::
prefix for maximum disambiguation). Given that this is generated code and readability shouldn't be a big priority, is it worth even having an opt-out?
For big models this could mean a lot of additional code, like tens of megabytes more.
Note from triage: we should do this by default, since the code is not intended to be edited, but with a switch to turn it off due to the increase in size.
See https://github.com/dotnet/efcore/issues/25523#issuecomment-1014681765