Tag Archives: dotnet

Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit

The article shows how to test an ASP.NET Core MVC API using xUnit and a HTTPClient client using Protobuf for the content formatters. Code: https://github.com/damienbod/AspNetCoreMvcProtobufFormatters Posts in this series: ASP.NET Core Using Protobuf Formatters Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit 2019-01-30 Updated to ASP.NET Core 2.2 2017-08-17 Updated ASP.NET Core […]

Implementing an Audit Trail using ASP.NET Core and Elasticsearch with NEST

This article shows how an audit trail can be implemented in ASP.NET Core which saves the audit documents to Elasticsearch using NEST. Code: https://github.com/damienbod/AspNetCoreElasticsearchNestAuditTrail History 2020-01-12 Updated to .NET Core 3.1 2019-02-15 Updated to .NET Core 2.2 Should I just use a logger? Depends. If you just need to save requests, responses and application events, […]

Creating an ASP.NET Core Docker application and deploying to Azure

This blog is a simple step through, which creates an ASP.NET Core Docker image using Visual Studio 2017, deploys it to Docker Hub and then deploys the image to Azure. Thanks to Malte Lantin for his fantastic posts on MSDN. See the links at the end of this post. Code: https://github.com/damienbod/AspNetCoreDockerAzureDemo 2017.02.03: Updated to VS2017 […]

Building production ready Angular apps with Visual Studio and ASP.NET Core

This article shows how Angular SPA apps can be built using Visual Studio and ASP.NET Core which can be used in production. Lots of articles, blogs templates exist for ASP.NET Core and Angular but very few support Angular production builds. Although Angular is not so old, many different seeds and build templates already exist, so […]

Implementing a Client White-list using ASP.NET Core Middleware

This article shows how a client safe-list could be implemented using ASP.NET Core middleware checking the Remote IP address of the request. If the client IP is on the safe-list, no restrictions exist. Code: https://github.com/damienbod/ClientIpAspNetCoreIIS History 2018-08-30 Updated to .NET core 2.1 and added support for IP6 The middleware uses an admin white-list parameter from […]

EF Core diagnosis and features with MS SQL Server

This article shows how Entity Framework Core messages can be logged, and compared using the SQL Profiler and also some of the cool new 1.1 features, but not all. All information can be found on the links at the bottom and especially the excellent docs for EF Core. Code: https://github.com/damienbod/EFCoreFeaturesAndDiag project.json with EF Core packages […]

Angular search with ASP.NET Core and Elasticsearch

This article shows how a website search could be implemented using Angular, ASP.NET Core and Elasticsearch. Most users expect autocomplete and a flexible search like some of known search websites. When the user enters a char in the search input field, an autocomplete using a shingle token filter with a terms aggregation used to suggest […]

Angular autocomplete with ASP.NET Core and Elasticsearch

This article shows how autocomplete could be implemented in Angular using ASP.NET Core MVC as a data service. The API uses Elasticsearch to query the data requests. ng2-completer is used to implement the Angular autocomplete functionality. Code: https://github.com/damienbod/Angular2AutoCompleteAspNetCoreElasticsearch 2017.02.10: Updated to VS2017, Angular 2.4.6 and webpack 2.2.1 2017.01.07: Updated to csproj, webpack 2.2.0-rc.3, angular 2.4.1 […]

ASP.NET Core Action Arguments Validation using an ActionFilter

This article shows how to use an ActionFilter to validate the model from a HTTP POST request in an ASP.NET Core MVC application. Code: https://github.com/damienbod/AngularAutoSaveCommands History 2021-01-20: Updated to ASP.NET Core 5, Angular CLI 11.0.9 2019-07-31: Updated to ASP.NET Core 3.0 Preview 7, Updated to Angular 8.1.3 2019-02-16: Updated to Angular 7.2.4, ASP.NET Core 2.2 […]

Angular Auto Save, Undo and Redo

This article shows how to implement auto save, Undo and Redo commands in an Angular SPA. The Undo and the Redo commands work for the whole application and not just for single components. The Angular app uses an ASP.NET Core service implemented in the previous blog. Code: https://github.com/damienbod/AngularAutoSaveCommands History 2021-01-20: Updated to ASP.NET Core 5, […]