Teemablogi sissekanded

25.05.2018

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. 09:24 25.05.2018 kanalilt DT blogi 2

24.05.2018

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. 06:57 24.05.2018 kanalilt DT blogi 2

23.05.2018

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. 08:00 23.05.2018 kanalilt DT blogi 2

22.05.2018

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. 08:16 22.05.2018 kanalilt DT blogi 2

17.05.2018

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. 07:50 17.05.2018 kanalilt DT blogi 2

16.05.2018

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. 07:58 16.05.2018 kanalilt DT blogi 2

15.05.2018

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. 07:59 15.05.2018 kanalilt DT blogi 2

11.05.2018

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. 07:55 11.05.2018 kanalilt DT blogi 2

10.05.2018

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. 08:26 10.05.2018 kanalilt DT blogi 2

09.05.2018

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. 07:57 09.05.2018 kanalilt DT blogi 2

08.05.2018

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. 09:28 08.05.2018 kanalilt DT blogi 2

03.05.2018

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. 10:06 03.05.2018 kanalilt DT blogi 2

30.04.2018

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. 07:45 30.04.2018 kanalilt DT blogi 2

26.04.2018

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. 08:45 26.04.2018 kanalilt DT blogi 2

18.04.2018

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. 09:42 18.04.2018 kanalilt DT blogi 2

19.03.2018

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. 10:00 19.03.2018 kanalilt DT blogi 2

16.02.2018

VS Code for PHP development

Although most of my work time is spent on ASP. NET and SharePoint development I also have some PHP projects. I have my own favorite thin tooling for PHP but I decided to give a try to Visual Studio Code (VS Code) with one of the projects. This blog post describes what I have in my dev box and what are my first impressions using VS Code for PHP development. Why VS Code? VS Code is not IDE like Visual Studio. 10:00 16.02.2018 kanalilt DT blogi 2

15.02.2018

Culture based views in ASP.NET Core

ASP. NET Core supports culture based views for more complex localizations. It means we have one view per culture per controller action. This blog post shows how to use culture based views in ASP. NET Core and how to implement them. Sample solution. Working code introduced here and in my blog post ASP. NET Core: Simple localization and language based URL-s is available in GitHub repository gpeipman/AspNetCoreLocalization. 10:00 15.02.2018 kanalilt DT blogi 2

12.02.2018

Reading request body in ASP.NET Core

Most of requests to controller actions of our ASP. NET Core applications send some simple parameters or some serialized model objects. But this is not always the case. There are also those requests we don’t want to map to models but we need the request body to process, save or use it some other ways. This blog post shows how to read request body in ASP. NET Core controller action. 09:47 12.02.2018 kanalilt DT blogi 2

06.02.2018

Building pager tag helper

Tag helpers are classes that can be applied to HTML and special tags in ASP. NET Core views. They are addition to HTML helper extension methods and they provide more flexibility by having their own classes and supporting framework level dependency injection. This blog post demonstrates how to create pager tag helper to support displaying paged results in ASP. NET Core views. 10:05 06.02.2018 kanalilt DT blogi 2