Web API – Tips

By | 17/03/2021

In this post, we will see two tips that could help us in order to create Web API. First of all, we create a simple Web API for managing a list of Users: [USER.CS] [USERTYPE.CS] [IUSERCORE.CS] [USERCORE.CS] [USERCONTROLLER.CS] [STARTUP.CS] We have done and now with Postman, we will verify it works fine: TIP #1We can… Read More »

C# – Events

By | 10/03/2021

In this post, we will see what an Event is and how we can use it.First of all, what is an Event?From Microsoft web site:“An event is a message sent by an object to signal the occurrence of an action. The action can be caused by user interaction, such as a button click, or it… Read More »

Category: C#

C# – Dynamic Type

By | 24/02/2021

In this post, we will see what a Dynamic Type is and how to use it. Dynamic Type was introduced in C# 4.0 and it avoids compile-time type checking.It escapes type checking at compile-time and it resolves type a run time.A dynamic type variable is defined using the dynamic keyword.Let see some examples: DEFINING A… Read More »

Category: C#

C# – Delegates

By | 10/02/2021

In this post, we will see what Delegates are and how to use them.First of all, what is a Delegate?From Microsoft web site: “A delegate is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a… Read More »

Category: C#

MongoDB – How to install it on macOS

By | 27/01/2021

In this post, we will see how to install and configure MongoDB on macOS. First of all, we open the Terminal and run the command /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” , in order to install Homebrew brew. Then, we run the command brew tap mongodb/brew, in order to download the official Homebrew formulae for MongoDB and… Read More »

Python – Try/Except

By | 20/01/2021

In this post, we will see how to manage Try/Except in Python. Just to remember what try/except is: Try/Except is a statement marks a block of statements to try and specifies a response should an exception be thrown.In detail, in Try/Except we have three blocks:Try,  used to test a block of code for errors.Except, used… Read More »