6 12 2017
C# 7.1 introduces asynchronous Main method for console applications. It helps us to get rid of some ugly code to await for asynchronous methods. If Main method of console applications is application flow controller that makes multiple calls to asynchronous methods then async Main leads us to much cleaner code. This blog post is my deep dive to async Main.
5 10 2017
Another day, another surprise on .NET Core. Tried to load a file with Windows-1252 encoding and got the following exception: NotSupportedException: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. Here’s how to solve the problem.
29 08 2017
My saga on supporting multiple tenants in ASP.NET Core web applications has come to point where tenants can use separate databases. It’s time now to write some tests for data context to make sure it behaves correct in unexpected situations. This post covers unit tests for data context and multi-tenancy.
16 08 2017
Entity Framework Core 2.0 introduces global query filters that can be applied to entities when model is created. It makes it easier to build multi-tenant applications and support soft deleting of entities. This blog post gives deeper overview about how to use global query filters in real-life applications and how to apply global query filters […]
14 08 2017
Today Microsoft announced versions 2.0 of .NET Standard, .NET Core, ASP.NET Core and Entity Framework Core. Also new updated to Visual Studio 2017 are available (both stable and preview version). This blog post is summary of most important features announced today.
1 08 2017
Ever wondered about mixing up simplicity and flexibility of PHP with power and performance of .NET Core? The solution is coming and it is called Peachpie, the successor of Phalanger. This blog posts introduces Peachpie – the tool to compile PHP code to .NET Core – and helps to get started with it.
6 07 2017
One of new features of C# 7.0 is support for local functions. Local functions are methods that are defined inside other methods to simplify more complex code and by example to support local recursion. This blog post shows how to use local functions in C# 7.0 and gives some advice in context of technical design of code.
1 06 2017
.NET Core 2 Preview 1 bits bring us support for VB.NET on .NET Core. Although tooling for web applications is not ready yet we can start with console applications and also some web applications like I will show in some of my later posts. Visual Studio 2017 Preview 2 is needed to try VB.NET out on .NET Core. This blog post is short demo about how to build simple utility application on .NET Core 2 Preview 1 using VB.NET.
5 04 2017
C# 7.0 introduces throw expressions. We can add exception throwing to expression-bodied members, null-coalescing expressions and conditional expressions. This blog post introduces throw expressions, demonstrates how to use them and also provides a peek behind a compiled throw expressions.
4 04 2017
C# 7.0 brings some new features to tuples and with code editors that support these new features we can use tuples with named members instead of names like Item1…ItemN. This blog post goes through practical example that demonstrates how to move on classic method that returns multiple values to new tuples.
23 03 2017
C# 7.0 brings some features to out variables. These new features help us write cleaner code and handle out variables better. This blog post provides samples of these new features in C# 7.0 and as a surprise it also demonstrates what compiler is doing with these new features.
9 01 2017
Paging query results is timeless topic and some days ago I got question about how to do it with Entity Framework Core. Using my previous work on paging I wrote some simple extension methods that work with IEnumerable and IQueryable interfaces. There’s also method that maps entities to models.
14 12 2016
We love to use our favorite logging solutions as much as possible but if external storage or external services are involved we cannot guarantee that logging works in crisis situation. This blog post introduces wrapper logger that uses main one to log all the messages and secondary one when main logger fails. Implementation is easy but there’s a good chance that log messages doesn’t get completely lost when main logging service goes down.
30 11 2016
For my up-coming presentation “ASP.NET Core on Linux” I need Linux VM I can access with Remote Desktop to run Visual Studio Code. After hours of different problems that grew fast over my head I was able to make things work and now I have functioning VM I can use for demos. This post is short overview about what I did and it is for those readers who also want to have Linux VM with Visual Studio Code.
17 07 2016
Search is important feature of many apps and web sites because it is the main way for users to find quickly the information they are looking for. Typing search keywords to search box is not the end point of search we can provide to users. Sites that have huge amount of data can also help users to find out what keywords to use. In this post I will show how to use Azure Search suggesters to help users to find out these keywords.
16 07 2016
In my last blog post about REST-clients Why Azure REST API-s and how to prepare for using them? I introduced how to write simple base class for Azure REST API-s. In this post we will implement simple REST-client for Azure Search. This is the same code that I’m using in my beer store sample application. I also make some notes about how to use search clients in domain models.
19 04 2016
When new Microsoft Azure services come they usually have REST API-s available. Of course, there are usually client libraries available too as NuGet packages but usually not for every .NET flavour. Although Microsoft has plans to publish libraries for CoreCLR too it doesn’t happen always fast. Let’s see how REST API-s work and how to prepare for using them.
11 02 2016
In one of my systems I’m using background process that hosts jobs that import and update some data and communicate with external services. These jobs are running after some interval or on specific moments. I generalized the common base part of these jobs so I can handle them as one in different background processes like Azure worker roles and Windows services. This blog post introduces my work and shows real-life implentation of jobs base.
5 02 2016
Our beer cooling solution is not controllable through IoT Hub and it reports data there. We can control our device through simple command line application but it is not enough for us. In this post we start building Universal Windows Application that helps us monitor temperatures. In this post we focus on mobile application.
4 02 2016
We are eager to try out our beer cooling solution and we want to see it in action. We want to visualize our data and keep eye on temperature of cooling beer. Before doing anything more complex like building web or mobile app we make a quick shortcut and bring our data to web, desktop and mobile. This post is about Power BI in action.