Sample App

The SampleApp .NET solution is written in C# using ASP.NET Core v3 implementing WebAPIs and MVC functionality.

The application is architected to be loosely coupled leveraging separation-of-concerns and single responsibility principles. Each method should do one thing and only one thing.


The solution is architected to be highly testable with a significant focus on automated unit testing.
Each unit test should be simple and only test one the thing. The common “Arrange, Act, Assert pattern” should be used within each unit test. The goal would be to achieve as high a level of (quality) code coverage as possible.

Logging is implemented with the built-in logging abstraction framework. It is configured locally to log to the debug window. When deployed, it is configured to log to Azure Application Insights.

Dependency Injection is implemented using the native .Net Core container.

** Not all applications will have all layers. For example, if you are not accessing data directly then you may not need any Data or Repository projects.

While this example demonstrates building microservices, the same structure and principals can be applied to a variety of other solutions by simply replacing the head of the application (WebApis in this example). For example, replace WebApis with a console application project or replace WebApis with an Azure Functions project – in either case all other layers underneath can still be used as needed.

[TBD]

Solution Architecture Guidance