Factory – Design Pattern in C# .Net
The Factory Design Pattern is a creational design pattern in C# and .NET that provides an interface for creating objects…
ES Modules vs CommonJS Modules in Javascript
Two different syntax and are suitable for different JavaScript environments: If you are working on a modern Node.js project with…
Implementing a Dto of a [HttpPost] Controller
In your provided code, it appears that you’re trying to create a new category using a DTO (CategoryDto) in your…
How to resolve the “System.Text.Json.JsonException” error maximum allowed depth of 32.
Error:System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth…
Example, how to include a Dto in my actual controller (HttpGet)
To include a DTO (Data Transfer Object) in your controller, you need to create an instance of the DTO, populate…
C# .Net Interfaces
In C# and .NET, an interface is a programming construct that defines a contract or a set of abstract members…
View models
In C# and .NET, a view model is a design pattern used to separate the presentation logic and data from…
A dotnet Controller explained
The provided code is for a controller in an ASP.NET Core Web API application. Let’s break down what each part…
ICollection in dotnet
In .NET, ICollection is an interface that represents a non-generic collection of objects that can be individually accessed by index…