Web API – How to use Polly library with Ocelot

By | 25/08/2020

In this post, we will see how to use the Polly library in the Microservices project created in the post: Web API – IHttpClientFactory.But, what is the Polly library?From the Official web site:“Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback… Read More »

Web API – IHttpClientFactory

By | 19/08/2020

In this post, we will see how to use IHttpClientFactory, in order to invoke a Web API.IHttpClientFactory is available since .NET Core 2.1 and it provides a central location for naming, configuring and consuming logical HttpClients in our application. For this post, we will use the project created in the post: Web API – Gateway… Read More »

SwiftUI – Slider

By | 12/08/2020

In this post, we will see how to create and manage a Slider in Swift, with a min value equal to 0 and a max value equal to 10 (with a step of 1). Moreover, every time Slider will change value, the app will run a method. We open Xcode, we create a “Single View… Read More »

WEB API – Gateway with Ocelot

By | 07/08/2020

In this post, we will see how to create an API Gateway using Ocelot. First of all, why should we use an API Gateway?From Microsoft web site:“In a microservices architecture, the client apps usually need to consume functionality from more than one microservice. If that consumption is performed directly, the client needs to handle multiple… Read More »

Python – Eval

By | 04/08/2020

In this post, we will see what Eval() is and how we can use it. We start creating a function that returns true if a given inequality expression is correct and false otherwise. Examples: test_signs(“3 < 7 <11”) return Truetest_signs(“13 > 44 > 33 > 1”) return Falsetest_signs(“1 < 2 < 6 < 9 >… Read More »

Unit Test – Web API

By | 31/07/2020

In this post, we will see how to implement Unit Tests for the Web API created in the post: Docker – Web API and Sql Server. First of all, we open Visual Studio and we add a xUnit Test Project called TestWebApiServices: Then, we add a file called UserControllerUnitTests, where we will define all objects… Read More »

Python – FizzBuzz

By | 28/07/2020

In this post, we will see how to resolve FizzBuzz using Python.We will create a function that takes a number as input and it will return “Fizz“, “Buzz” or “FizzBuzz“.The rules are: EXAMPLES:Fizz_buzz(3) -> “Fizz”Fizz_buzz(5) -> “Buzz”Fizz_buzz(15) -> “FizzBuzz”Fizz_buzz(4) -> “4” SOLUTION:We open Visual Studio Code and we create a file called FizzBuzz: [FIZZBUZZ.PY] If we… Read More »