Image by Gerd Altmann from Pixabay

In this post, I share the three libraries I find useful for unit testing a .NET project: EF Core SQLite Database Provider, Bogus and Moq.

Entity Framework Core SQLite Database Provider

Before I learned about and started using Entity Framework in projects, I was reluctant to test database-related codes because I thought the tests would have to connect to an external database, which could be a problem, especially when using a CI process to build the app. However, Entity Framework SQLite provider makes it much straightforward to setup an in memory database and a DBContext wrapping around it. …

Image by Gerhard G. from Pixabay

In October 1987, Barbara Liskov published a research paper in which she discussed about different but related concepts: data abstraction, inheritance, encapsulation, implementation hierarch, type hierarchy and polymorphism. I’ve found the paper to be insightful and informative. In this post, I simply give a recap of what I have learned and share my thoughts from reading the paper.

Data abstraction, inheritance and encapsulation are fundamental concepts in object oriented programming. Data abstraction separates the implementation from the specification of a class, and having the callers of the class to rely on the specification. Encapsulation hides away the implementation details of…

Image by Henryk Niestrój from Pixabay

In the previous post, I wrote about Barbara Liskov research paper on data abstraction and hierarchy. In the paper, the author states a property which exists between type and subtype. That property later becomes known as the Liskov Substitution Principle. In this post, I continue to go over the principle in more details and give examples. The principle is one out of the five software design principles in SOLID:

  • S: Single Responsibility Principle
  • O: Open Closed Principle
  • L: Liskov Substitution Principle
  • I: Interface Segregation Principle
  • D: Dependency Inversion Principle

What is the Liskov Substitution Principle?

The Liskov Substitution Principle refers to a property between a type…

In this post, I continue to share what I have learned about the SOLID principles in the book “Clean Architecture A Craftsman’s Guide to Software Structure and Design”. As a recap, six principles make up the SOLID acronym:

  • The Single Responsibility Principle.
  • The Open Closed Principle.
  • The Liskov Substitution Principle.
  • The Interface Segregation Principle.
  • The Dependency Inversion Principle.

In the previous post, I wrote about the Single Responsibility Principle. In this post, I write about the Open Closed Principle.

The Open Closed Principle states that a module should be open for extension, but closed for modification. The definition can be…

Recently, I read the book “Clean Architecture” by Robert C. Martin. Overall, this is a great book with a wealth of information on software design principles to guide developers to build scalable, maintainable and flexible applications. A core part of the book discusses about six design principles which together make up the acronym SOLID.

The SOLID acronym represents the six principles:

  • S: The Single Responsibility Principle.
  • O: The Open Closed Principle.
  • L: The Liskov Substitution Principle.
  • I: The Interface Segregation Principle.
  • D: The Dependency Inversion Principle.

In this post, I give a recap of the Single Responsibility Principle, which is…

Photo by Jason Dent on Unsplash

In this post, I outline a few fundamental concepts I have learned about an Observable and how it is different than a Promise.

Before discussing the differences between an Observable and a Promise, let’s talk about what they have in common. Both Observables and Promises are frameworks for producing and consuming data. They follow the push protocol which means the producer determines exactly when to send the data to the consumer. In comparison, in a pull protocol, the producer only produces data when the consumer asks for it.

In a Promise, the consumer is the resolve callback that you pass…

Photo by Shopify Partners from Burst

I have a back-end-for-front-end application which I scaffolded using Visual Studio. The backend is an ASP.NET core web API, and the front end is Angular. In the angular application, I have Cypress end-to-end tests that I want to run as part of a build pipeline. Accomplishing the objective requires a few things. For instance, I need to install Cypress binaries on the build agent. I also need to start the angular app to which the tests can run again. Installing Cypress binaries is a lengthy process, and with other steps, the entire build can take a long time to finish…

Image by Gerd Altmann from Pixabay

In the previous post, I talked about using self-service sign-up via user flows to onboard an external user. With self-service sign-up, you can integrate with custom REST endpoints to implement approval workflows and other business logic. I’ve learned of another way to onboard and manage a user’s access by using Entitlement Management, which has built-in rich approval workflow and access lifecycle so you don’t have to build additional APIs to implement an approval workflow.

What is Entitlement Management

Microsoft has a good description of what’s entitlement management:

Azure Active Directory (Azure AD) entitlement management is an identity governance feature that enables organizations to manage…


Image by Gerd Altmann from Pixabay

Microsoft has added several great features to help with managing identity and access of an external user in B2B collaboration. One such feature is the Azure AD Self-Service Sign-Up via user flows for an external user to sign up as a guest user in the host Azure AD tenant. I found the feature to be promising, but at the time of writing, it’s still in preview and have limitations.

What is Self-Service Sign-Up via user flows?

The self-service sign-up provides several configurations for capturing information about the user on sign-up, integrating with social identity providers (Facebook, Google and other SAML/WS-Fed IdP), and integrating with custom REST APIs…

Image by S K from Pixabay

In one of the core projects I worked on, I used iTextSharp.LGPLv2.Core to programmatically fill out a PDF form. Sometimes, we have a string that is too long to fit within the rectangle area of the text field. After a bit of googling, I found and adopted the solution in this StackOverFlow to solve this problem by dynamically compute the appropriate font size I can use so that the value can fit within the field.

The logic is fairly straightforward.

  1. Find the current font size and width of the text field.
  2. Compute the width of the value using the…

Tai Bo

Backend developer in .NET core. I enjoy the outdoor, hanging out with good friends, reading and personal development.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store