Category SQL

.NET Core, ASP.NET Core logging with NLog and PostgreSQL

This article shows how .NET Core or ASP.NET Core applications can log to a PostgreSQL database using NLog. Code: https://github.com/damienbod/AspNetCoreNlog Other posts in this series: ASP.NET Core logging with NLog and Microsoft SQL Server ASP.NET Core logging with NLog and Elasticsearch Settings the NLog database connection string in the ASP.NET Core appsettings.json .NET Core logging […]

ASP.NET Core with MySQL and Entity Framework Core

This article shows how to use MySQL with ASP.NET Core 1.0 using Entity Framework Core. Code: VS2017 msbuild | VS2015 project.json Posts in this series: Experiments with Entity Framework Core and ASP.NET Core MVC ASP.NET Core with PostgreSQL and Entity Framework Core ASP.NET Core with MySQL and Entity Framework Core 2017.02.10: Updated to VS2017 and […]

Creating and requesting SQL localized data in ASP.NET Core

This article shows how localized data can be created and used in a running ASP.NET Core application without restarting. The Localization.SqlLocalizer package is used to to get and localize the data, and also to save the resources to a database. Any database which is supported by Entity Framework Core can be used. Code: https://github.com/damienbod/Angular2LocalizationAspNetCore 2017.05.14: […]

ASP.NET Core using SQL Localization

This article shows how to use SQL localization in ASP.NET Core using an SQL database. The SQL localization in the demo uses Entity Framework Core to access a SQLite database. This can be configured to use any EF core provider. Code: https://github.com/damienbod/AspNetCoreLocalization Library: https://github.com/damienbod/AspNetCoreLocalization/tree/master/src/Localization.SqlLocalizer NuGet package: https://www.nuget.org/packages/Localization.SqlLocalizer/ Documentation: http://localizationsqllocalizer.readthedocs.io/en/latest/ Posts in this series ASP.NET Core […]

Experiments with Entity Framework Core and ASP.NET Core MVC

The article shows some of the ways in which Entity Framework Core can be used together with ASP.NET Core MVC. Both packages run on dotnet which makes it possible to run on Linux, Mac or Windows operating systems. The Entity Framework providers are implemented in separate data access projects using onion architecture. Code: VS2017 msbuild […]

ASP.NET Core 1.1 MVC File Upload with MS SQL SERVER FileTable

This article shows how to upload and download files in ASP.NET Core 1.1 MVC and save the files to a MS SQL Server using FileTable. The data access for the application is implemented in a separate project and EF7 migrations is used to setup the select logic for the database. Code: https://github.com/damienbod/AspNet5FileUploadFileTable 2017.01.07: Updated to […]

MVC CRUD with Elasticsearch child, parent documents

This article demonstrates how to search for data in Elasticsearch using parent and child documents. The documents are all saved inside the same index and the child documents are saved on the same shard using the parent id as the routing. As in the previous ElasticsearchCRUD tutorials, an autocomplete in used to search for the […]