Tagged articles
Image from Pexels

Tagged articles - ASP.NET Core

Found 58 articles tagged with ASP.NET Core

Combining multiple Swagger API endpoints in a single UI
Multiple REST API microservices endpoints in a single Swagger UI
 
0
Shifting from traditional monolithic application architecture to micorservices can solve bunch of problems and issues monolith application application design approach introduces, but on the other hand it has it's own drawbacks, although number of drawbacks compared to number of problems it solves is a lot greater so it makes sense to take a path in process of moving from monolithic to micorservices. On of the steps to move to micorservices is to physically have your services running as individual processes...read more
Mocking HttpClient in unit tests with Moq and Xunit when using IHttpClientFactory
Unit testing IHttpClientFactory by mocking HttpClient in .NET Core C#
 
0
.NET Core has done a great job by introducing interface for most of classes which makes them easy to write unit tests around them. However, there are a lot of classes that re commonly used which are not refactored in .NET Core...read more
Overwriting configuration values with environment variable in ASP.NET Core
Using environment specific variables to overwrite configuration values in ASP.NET Core
 
0
It is obvious that no matter what is the size and complexity of your application, configuration values on your local development machine and the environment where the application is going to run will be different. To avoid any hard-coding and recompilation of your code, the most common practice is to store application and environment specific values to configuration files...read more
Custom SignalR hub authorization in ASP.NET Core
ASP.NET Core SignalR hub authorization
 
0
SignalR is number one choice for real-time communication between server and client. It implements several transports for communication between server and client...read more
Mocking System.IO filesystem in unit tests in ASP.NET Core
Testable filesystem operations in ASP.NET Core and C#
0
Working with file system operations like creating or deleting files and directories if quite often part of applications flow. Both .NET and .NET Core come with great out of the box classes and methods to achieve this. These classes and methods are part of System.IO name space, but unfortunately both .NET and .NET Core implementations are the same and they use static classes and method to manipulate files and directories on the host file system. ...read more
Increase service resilience using Polly and retry pattern in ASP.NET Core
Retry pattern in ASP.NET Core with Polly
0
Whether you are doing micro-services or mid-size monolith applications that do not have to be too distributed, there is a big chance that you will depend on some external HTTP service. Whether it is REST, SOAP or any other type of the response, your application flow depends on it's response. Sure using queues and event-based communication between services or components will definitely increase the resilience of the application and make more error-proof, it adds additional complexity to the whole solution and sometimes that can be an overhead depending on the application type or the infrastructure you might be limited with. ...read more
Unit testing repositories in ASP.NET Core with xUnit and Moq
Mocking UserManager RoleManager and DbContext in unit tests in .NET Core
0
Unit testing is an important part for maintaining code quality and what is the most important thing, avoiding bugs in production. This is one of the reasons why unit tests and high code coverage is desired as a part of the project and as a part of the build process since you can detect potential bugs and issues during the build process when unit tests are executed...read more
Mixed model binding in ASP.NET Core using custom model binders
IModelBinder interface implementations usage for multiple source model binding
 
0
Patterns, conventions and standards are invented and enforced in order to make coding easier and more understandable for the developers, but in some cases certain patterns and conventions do not couple so easily and you have to rely on more on the actual technology you are using in order to overcome these complications. One of the cases this happens is using CQRS, especially commands and REST...read more
Handling file uploads in Swagger UI with ASP.NET Core
Swagger UI file upload in ASP.NET Core WebApi
0
Swagger is the most convenient way to document your REST api endpoints. It provides generating of documentation on the fly based on the code structure, which shortens the time of creating the documentation drastically...read more
Using dispatcher class to resolve CQRS commands and queries in ASP.NET Core
Injecting dispatcher class instead of multiple commands and queries in controller constructor
0
Recently I wrote an article about Automatic CQRS handler registration in ASP.NET Core with reflection in order to reduce number of lines for registering command and query to IOC container in ASP.NET Core. However, this solution does reduce lines for service registration in the startup, you still need to add all command and query handlers as parameters to the controller constructor. ...read more
Automatic CQRS handler registration in ASP.NET Core with reflection
Registering all query and command handlers in your CQRS implementation in ASP.NET Core
0
Command Query Responsibility Segregation (CQRS) pattern is one of my favorite way of handling the Web API requests for a simple reason that is clearly separates reading and writing. Quite often at some stage of the project you will hit the performance bottlenecks which are most probably cause by the way you are reading ow writing your data. CQRS splits reading and writing so that you can independently use different persistence framework for reading and writing...read more
Localization of the DTOs in a separate assembly in ASP.NET Core
Localizing validation messages in ASP.NET Core WebAPI
0
Since REST services do not have the UI, there is not much space for the localization. Data is sent and retrieved and most of the decisions is made based on the status code of the response...read more
Displaying Azure DevOps build number in Swagger UI for ASP.NET Core
How to add and show Azure DevOps build number in ASP.NET Core project and Swagger UI
0
Swagger is a great way to document you REST API endpoints and reduce the need for communication, item spent and the cost for supporting the consumers of you APIs. Apart from providing the info about the endpoints, models, validation it can also display the data of the product...read more
Why you should not use Authorize attributes to protect your API endpoints
Protecting ASP.NET Core WebAPI without using Authorize attribute
0
Authentication is an essential component of pretty much any REST API. Most of the resources you expose through REST API services, unless they are protected inside intranet, need to be protected by some kind of authentication. This is pretty much clear and it is easy achieved by just simply decorating your controller actions or even whole controllers with Authorize or AllowAnonymous attributes. ...read more
DTO comments from external assembly in Swagger documentation in ASP.NET Core
Involving contract classes documentation from separate assemblies to Swagger
0
Contracts, models or DTOs, call them how ever you want, are your connection with the outside world from your REST API. Consumers of your API depend on them and they know what to expect or what your API endpoints expect in communication...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more