X

.NET

Writing to CSV-file from multiple threads

I was writing document and metadata exporter that reads data from SharePoint and writes it to multiple files. I needed to boost up performance of my exporter and I went with multiple threads pumping out the data from SharePoint. One problem I faced – writing metadata to CSV-files from multiple threads in parallel. This blog post shows how to do it using concurrent queue.

Worker Service template in .NET Core 3.0

With ASP.NET Core 3.0 Preview 3 we have template for background processes like Windows services and Linux daemons. New project template is called Worker Service and this writing shows how it works and how to use it.

.NET Core 3.0 Preview 3 now available!

.NET Core 3.0 Preview 3 is out and there are many interesting updates to framework and to ASP.NET Core. Here’s the short list of what’s new.

Entity Framework Core supports constructors with arguments

Keeping objects complete and valid all the time is strategy used in different methodics. It’s perhaps most popular in Domain Driven Design (DDD). Entity Framework Core 2.1 made big step forward on supporting entities that doesn’t have default empty constructor. This blog post shows how to use Entity Framework Core and entities with constructor arguments.

Running .NET Core apps on Windows Sandbox

After my first introduction to Windows Sandbox I took one of my ASP.NET Core applications and tried to find a way how to get it quickly to Windows Sandbox and open in browser. This scenario is already possible and it wasn’t hard all to make things work. This blog post shows how to do it.

Dependency injection in .NET Core console applications

ASP.NET Core uses built-in dependency injection mechanism provided by Microsoft. This blog post intorduces how to use same mechanism in .NET Core console applications. For those who like other DI/IoC frameworks this writing provides demo about how to use Autofac with .NET Core framework-level dependency injection.

Using-declarations in C# 8.0

One of new language features of C# 8.0 is support for using declarations. These declarations enable shorter syntax for declaring disposable variables we want to dispose. Also using declarations give us a little bit cleaner code while compiler makes a dirty work of producing correct code that takes care of disposing disposable variables.

Running WordPress on .NET Core

About year ago I wrote a blog post Running PHP applications on .NET Core where I introduced how to build PHP applications to .NET Core using Peachpie. Their showcase was WordPress – the famous blog engine that also runs my blog. Peachpie guys have made significant work over year and they have reached the point where whole WordPress is built as .NET Core application.

Inferred tuple names in C# 7.1

Although C# 7.1 hasn’t many new features there are still some convenience hacks I like. One of these is inferred tuple names meaning that we can name tuple members using variable names. It’s not a big change in language but it still makes code a little bit cleaner where tuples are used.

New killer features planned for .NET Core, ASP.NET Core and Entity Framework Core 2.1

Microsoft announced roadmap for upcoming release of .NET Core family versioned as .NET Core 2.1. While there are some new features and many improvements coming I compiled a list of my favorites that I see as most imortant to all developers building solutions on .NET Core, ASP.NET Core and Entity Framework Core.