Tag Archives: MVC

Using Angular in an ASP.NET Core View with Webpack

This article shows how Angular can be run inside an ASP.NET Core MVC view using Webpack to build the Angular application. By using Webpack, the Angular application can be built using the AOT and Angular lazy loading features and also profit from the advantages of using a server side rendered view. If you prefer to […]

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 Should I just use a logger? Depends. If you just need to save requests, responses and application events, then a logger would be a better solution for this use case. I […]

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/Angular2AutoSaveCommands 2017.02.03: Updated to Angular 2.4.5 and webpack 2.2.1, VS2017 RC3, msbuild3 2016.12.23: Updated to Visual Studio 2017 and ASP.NET Core 1.1 Other articles in this series: Implementing UNDO, REDO in […]

Injecting Configurations in Razor Views in ASP.NET Core

This article shows how application configurations can be injected and used directly in razor views in an ASP.NET Core MVC application. This is useful when an SPA requires application URLs which are different with each deployment and need to be deployed as configurations in a json or xml file. Code: https://github.com/damienbod/AspNetCoreInjectConfigurationRazor 2017.02.03: Updated to VS2017 […]

Import and Export CSV in ASP.NET Core

This article shows how to import and export csv data in an ASP.NET Core application. The InputFormatter and the OutputFormatter classes are used to convert the csv data to the C# model classes. Code: https://github.com/damienbod/AspNetCoreCsvImportExport 2017.02.12: Updated to VS2017 msbuild 2016.11.25: Updated ASP.NET Core 1.1 2016.06.29: Updated to ASP.NET Core RTM The LocalizationRecord class is […]

Adding SQL localization data using an Angular form and ASP.NET Core

This article shows how SQL localized data can be added to a database using Angular forms which can then be displayed without restarting the application. The ASP.NET Core localization is implemented using Localization.SqlLocalizer. This NuGet package is used to save and retrieve the dynamic localized data. This makes it possible to add localized data at […]

Angular Localization with an ASP.NET Core MVC Service

This article shows how localization can be implemented in Angular for static UI translations and also for localized data requested from a MVC service. The MVC service is implemented using ASP.NET Core. This post is the first of a 3 part series. The following posts will implement the service to use a database and also […]