PrimaryConstructor icon indicating copy to clipboard operation
PrimaryConstructor copied to clipboard

Feature to enable Asp.Net project wide primary constructors on all controllers?

Open jbuedel opened this issue 3 years ago • 0 comments

Would you consider a feature where all controllers in an Asp.Net project are automatically subject to having their constructor generated? So like, perhaps an assembly level [assembly: PrimaryConstructor] attribute would trigger it. Or maybe simply inclusion of an Asp.Net Mvc targeted nuget package like PrimaryConstructor.Mvc could be enough. I think the logic could be to simply look for classes inheriting from ControllerBase instead of classes decorated with [PrimaryConstructor].

If you like the idea I would be interested in taking a crack at a pull request.

jbuedel avatar Dec 11 '22 15:12 jbuedel