Teemablogi sissekanded


Razor Class Library with ASP.NET Core MVC

ASP. NET Core 2. 1 introduces Razor Class Library (RCL). It’s the new way how to share reusable web application components with UI as dependent project or NuGet package. As public examples mostly cover how it works with Razor Pages, I decided to write this blog post and demo application for ASP. NET Core MVC. Source code available! I created demo application that shows all stuff written here. Feel. . . Source. 06:17 05.06.2018 kanalilt DT blogi 2


Pattern matching in switch statements

One of new features introduced by C# 7. 0 is support for pattern matching in switch statements. It’s like mix of switch and if statements so we don’t have to nest these two. This blog post introduces pattern matching in switch statements and shows what C# compiler produces of switch statements. Let’s take a look at the following switch statement that introduces new concepts. public static void. . . Source. 04:13 04.06.2018 kanalilt DT blogi 2


Speaking at Riga Dev Days 2018

This week I am speaker at Riga Dev Days 2018 conference – the biggest one happening this year at Baltic states. It has workshops day on 29th of May and two conference days on 30th and 31st of May. My presentation is on 30th at 17:30 o’clock and it is about Azure Computer Vision services. Here’s more about the event and my presentation there. Riga Dev Days brings together the world class experts in. . . Source. 09:13 29.05.2018 kanalilt DT blogi 2

Analyzing images using Azure Cognitive Services

Computer Vision API of Azure Cognitive Services can be used to analyze and describe images. It’s rich API that supports also faces and landmarks recognition, not to mention automatic describing and tagging of images. This blog post shows how to use image analyzing features of Azure Cognitive Services. Source code available! This blog post is based on ASP. NET MVC demo application available at. . . Source. 06:28 29.05.2018 kanalilt DT blogi 2


Effective bundling with ASP.NET MVC

Bundling and minification has been available in ASP. NET MVC for a long time. This blog post focuses on problems people have had with bundling and provides working solutions for those who cannot use bundling in ASP. NET MVC for different reasons. Also some ideas about more effective bundling are presented here. Source code available! Solution with ASP. NET MVC web application that contains code given. . . Source. 08:24 25.05.2018 kanalilt DT blogi 2


Building confirm delete dialog on Blazor

Blazor supports communication with JavaScript using JavaScript interop. I used JavaScript interop in Blazor when building confirm delete dialog of my Blazor demo application. This blog post shows how to interact with JavaScript code from Blazor and how to build interactive dialogs. Source code! This blog post is based on my Blazor demo application. It is simple application for books database with. . . Source. 05:57 24.05.2018 kanalilt DT blogi 2


Automatically describing and tagging pictures on SharePoint using Azure Cognitive Services

Azure Cognitive Services has wider audience than cool young guys developing very cool mobile apps. These services can be used in very different use cases. This blog post shows how to use Azure Cognitive Services to automatically describe and tag photos added to Office 365 SharePoint picture library using Microsoft Flow as workflow engine. Automatic image describing and tagging SharePoint on Office. . . Source. 07:00 23.05.2018 kanalilt DT blogi 2


Non-trailing named arguments in C# 7.2

One small change that comes with C# 7. 2 is support for non-trailing named arguments in method calls. This post explains what are non-trailing named arguments, how to use them and how they look after compiling. Source code available! Those who want some basic samples of new features can take my solution from GitHub repository gpeipman/CSharp7. This is (almost) the same solution I’m using for. . . Source. 07:16 22.05.2018 kanalilt DT blogi 2


Dependency injection in Blazor

In one of my previous Blazor post Separating code and presentation of Blazor pages I briefly covered dependency injection in Blazor views and components. This posting makes step further and based on my Blazor demo solution it shows how to inject custom instances to Blazor pages using built-in dependency injection. Source code! This blog post is based on my Blazor demo application. It is simple. . . Source. 06:50 17.05.2018 kanalilt DT blogi 2


protected private access modifier in C# 7.2

C# 7. 2 introduces new access modifier – protected private. It targets developers who are responsible for class libraries and API-s design and who need also consistent design for internals of class libraries. This blog post shows how protected private access modifier works. Source code available! Those who want some basic samples of new features can take my solution from GitHub repository. . . Source. 06:58 16.05.2018 kanalilt DT blogi 2


Building Blazor pager component

I had presentation for local community about Blazor and as a side-product I built something useful. Blazor supports components that are a little bit similar to ones we have in React. js. I took my previous work from my blog posts Paging with Entity Framework Core and Building Pager view component and built simple but generic pager component for Blazor. Source code available!. Please visit my GitHub. . . Source. 06:59 15.05.2018 kanalilt DT blogi 2


Default literal expressions in C# 7.1

C# 7. 1 introduces a little update to default literal expressions that makes them a little bit shorter and on some cases helps us write cleaner and more readable code. This blog post introduces this litlle feature update in C# 7. 1 and peeks behind the compiler to see what is produced of default literal expressions. Old style default literal expressions Default literal expressions let us use default. . . Source. 06:55 11.05.2018 kanalilt DT blogi 2


Separating code and presentation of Blazor pages

Although there are many examples available demonstrating Blazor views it is also possible to separate code and presentation by using Razor pages with backing model. This blog post is based on my Blazor presentation and focuses on separating code and presentations of Blazor pages. Sample form For this post I’m using sample edit form from my Blazor presentation. It’s simple one and allows to. . . Source. 07:26 10.05.2018 kanalilt DT blogi 2


Advanced Raspberry Pi traffic lights simulator

My previous post about Raspberry Pi traffic lights introduced simple traffic lights simulator. I developed the solution further and came out with more advanced version that has better architecture, more flexible design and support for traffic lights schedules that are automatically downloaded from remote server. I published new and more advanced version of traffic lights project where software. . . Source. 06:57 09.05.2018 kanalilt DT blogi 2


Creating PDF on ASP.NET Core

Creating PDF files on ASP. NET Core has been issue for awhile. I needed some proof-of-concept solution to prove it’s possible to generate PDF files on ASP. NET Core easily without writing a lot of code or going through complex configuration. I solved the problem and here is my solution. The best and most polished solution I found was Rotativa. AspNetCore. It takes some additional steps after. . . Source. 08:28 08.05.2018 kanalilt DT blogi 2


Global DevOps Bootcamp 2018 is coming to Tallinn!

The new event we will hold first time this year at Tallinn is Global DevOps Bootcamp 2018. It takes place at 16th of June at premises of local Microsoft office. The event is organized by UserGroup Estonia – the local Microsoft user-group managed by Estonian MVP-s. We welcome also english speaking attendees from other countries and besides learning new things, attending at our DevOps Bootcamp is. . . Source. 09:06 03.05.2018 kanalilt DT blogi 2


Simulating traffic lights with Raspberry Pi and Windows 10 IoT Core

Most of beginner examples for Raspberry Pi introduce how to turn on and off LED lamp. I wrote a little bit more complex starting example but it has some touch from real life – my example simulates traffic lights. I’m IoT noobie but using Microsoft tools it was actually easy to build this little example. This blog post is short introduction about what I did. Getting started To get started we need. . . Source. 06:45 30.04.2018 kanalilt DT blogi 2


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. In C# 7. 07:45 26.04.2018 kanalilt DT blogi 2


WebAssembly apps with Blazor

Next version of ASP. NET Core is getting better and better and with it we can use new tooling for Blazor applications announced yesterday at official ASP. NET blog. Blazor is Microsoft tooling to build WebAssembly applications using . NET languages. This blog post is short introduction to Blazor tooling and WebAssembly. 08:42 18.04.2018 kanalilt DT blogi 2


Visual Studio Live Share for collaborative coding

Sharing code and working together on it in real time from different locations has been issue for years. We have video chat and screen sharing for long time but working on same files together in IDE has been a dream. Visual Studio Live Share is here to solve the problem. Although the service is not generally available yet it is possible to try out early versions of it using Visual Studio or Visual Studio Code. 09:00 19.03.2018 kanalilt DT blogi 2