This sample code shows how to develop an Azure web app with ASP.NET Core 2.1
- Use
LoggerinCommonproject for trace. May use ILogger to route to Application Insights in the future. - Use
AutoMapperfor object-object mapping. - When creating a new project, use
StyleCopandFxCop.- StyleCop: Provides developers an effective way to follow the coding standard which makes your codebase looks like it's been written by a single person.
- FxCop: Checks your code for security, performance, and design issues.
- How to use them?
- Install their Nuget Packages:
StyleCop.AnalyzersandMicrosoft.CodeAnalysis.RxCopAnalyzers. - Include
Shared\StyleCop\stylecop.rulesetin your project file. Please refer to existing projects. - You can customize your rules either in stylecop.ruleset or in Visual Studio.
- Install their Nuget Packages:
- When you troubleshoot an issue or performance tuning, you can add or update configuration items in
Application settingson Azure portal to override the same settings in appsettings.json in the code. - You can query
Application Insightsto assist troubleshoot.