Menu
C# querying the EWS Managed API from as asp.net core web api

C# querying the EWS Managed API from as asp.net core web api

Let see how we can integrate the Microsoft Exchange (AKA EWS) and access the information.

ASP.NET Core C# API – Register a service dependency that uses HttpClient correctly

ASP.NET Core C# API – Register a service dependency that uses HttpClient correctly

More often we have to call a RESTfull service, it could be simple as sending an email, SMS, posting a message, etc. We use can use an HttpClient for all our HTTP calls. Alternatively, we can use a library such as Restshaper.

C# – Unit testing a AutoMapper Profile mappings

C# – Unit testing a AutoMapper Profile mappings

When you use AutoMapper to map our objects, and AutoMapper profiles are the way we do it, it encapsulates a lot of business logic in some cases. But we need to make sure the business logic gets unit tested.

C# – Unit testing a Mediator handler that has AutoMapper Profile

C# – Unit testing a Mediator handler that has AutoMapper Profile

As part of my Mediator handler, I have multiple dependencies injected they are DbContext, IMapper. But remember, as part of the application initialisation we have AutoMapper Profile registration automatically. But it’s not the case with Unit Testing we need to register the dependencies or mock them. Therefore we need to add the Profile to our IMapper initialisation.

Asp.net Cache Core – using in memory cache

Asp.net Cache Core – using in memory cache

Most of the apps we write have some data that not get updated frequently or not get updated at all. For example – suburb list, user roles, etc. We can avoid reading the database for all those entities by using a cached collection.

Register Dependencies in ASP.NET Core app

Register Dependencies in ASP.NET Core app

This quick tutorial will show how we ca register dependencies for Dependency Injection in ASP.NET Core using the built-in container.