You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to define 2+ projectable methods with the same name on the same class but give them different argument lists, then the source generator triggers an error indicating that classes with the same name cannot be provided by the same source generator. It appears this is because the class name is generated via the namespace+class+method. Would it be difficult/problematic to expand this so that the generated class names also include the number and type of the arguments? For example...
It's important to note that this is more of a nice-to-have. I attempted to do method overloads and ran into this error, after which I had to work around it by using a naming convention like, FindImageById, FindImageByUri, FindImageByFolderAndTag, etc. It did not significantly impact my ability to use this library, but it was something I wanted to do and which I was disappointed to discover I could not do. However, I can understand if one would not wish to work on adding it as a feature.
The text was updated successfully, but these errors were encountered:
For now a helpful error would probably be a good patch. I didn't realize this limitation and was hitting my head against a wall on this for ages. When I added overloaded methods every query would start failing as their projectables couldn't be resolved.
Turns out it was because of a newly added overload!!
If I try to define 2+ projectable methods with the same name on the same class but give them different argument lists, then the source generator triggers an error indicating that classes with the same name cannot be provided by the same source generator. It appears this is because the class name is generated via the namespace+class+method. Would it be difficult/problematic to expand this so that the generated class names also include the number and type of the arguments? For example...
EntityFrameworkCore.Projectables.Generated.MyNamespace_MyClass_FindImage_P1_System_Int32
EntityFrameworkCore.Projectables.Generated.MyNamespace_MyClass_FindImage_P1_System_Uri
EntityFrameworkCore.Projectables.Generated.MyNamespace_MyClass_FindImage_P1_System_Uri_P2_System_String
It's important to note that this is more of a nice-to-have. I attempted to do method overloads and ran into this error, after which I had to work around it by using a naming convention like,
FindImageById
,FindImageByUri
,FindImageByFolderAndTag
, etc. It did not significantly impact my ability to use this library, but it was something I wanted to do and which I was disappointed to discover I could not do. However, I can understand if one would not wish to work on adding it as a feature.The text was updated successfully, but these errors were encountered: