Clean architecture is an architecture that follows set of design principles (mostly SOLID) and divides the solution into different layers (mostly 4 layers).
- Properties are first class citizens in C#
- We used properties to achieve abstraction
- Properties are implemented via accessors
- Enable developers to write code that accurately expresses their design intent #dotnet
Read only Properties
- Serve the purpose of getters
- Use them for retrieving the information in DTO
- We can not set them
It states that don’t repeat yourself what it means it is saying don’t duplicate code , avoid duplication. Purpose is to reduce the redundant code in your application 🧵⏬ #dotnet
Following the DRY Principle can give us following benefits
HttpClient is a class in C# that is used for making HTTP calls of different kinds (most commonly Get/Put/Delete/Post).This class comes from namespace System.Net.Http
Most commonly used methods of this class are
- GetAsync
- DeleteAsync
- PostAsync
- PutAsync
- Dispose