Here is how to change the default Visual Studio auto generated field naming convention from PascalCase and the .this keyword to the more standard underscore and camelCase.
So this default code will change:
private readonly IPublishedContentMapper AnaxiMapper; public BlogPostPageController(IPublishedContentMapper anaxiMapper) { this.AnaxiMapper = anaxiMapper; }
Into this:
private readonly IPublishedContentMapper _anaxiMapper; public BlogPostPageController(IPublishedContentMapper anaxiMapper) { _anaxiMapper = anaxiMapper; }
Go to Tools -> Text Editor -> C# -> Code style -> Naming
Click on "Manage naming styles".
Click on the plus sign at the bottom left to add a new naming style.
Fill in the name of the naming style at the top, e.g _fields.
Fill in the prefix at "Required prefix", in my example an underscore: _. An example on how it will look will appear in the bottom text box.