Local functions in C# 7.0
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.
Building web API apps on ASP.NET Core 2 and VB.NET
ASP.NET Core 2 will come with full support for VB.NET. In current preview we can use VB.NET to build .NET Core applications. I was still successful on mixing up C# and VB.NET project files and port C# code over to VB.NET and build proof-of-concept level web API applicaton that returns fake data about current weather in different cities.
MSSQL: Finding weekend days in month
One of my applications displays tables with some calculations about users working time. This is for corporate reporting. For this table I needed a way to find how many weekends days are in given month. As most of calculation work is done in SQL Server stored procedure I decided to keep stuff there and found a way how to get weekend days with common table expression.
Creating simple shoutbox using ASP.NET Core Razor Pages
ASP.NET Core 2 comes with Razor Pages that allow developers to build simple web applications with less overhead compared to MVC. The emphazise is on the word “simple” as Razor Pages doesn’t come with patterns suitable for bigger and more complex applications. For this we have MVC that is flexible enough to build applications that will grow over years. This blog post uses simple shoutbox application to illustrate how to build applications using Razor Pages.
General CSS path transform for ASP.NET bundling
In couple of ASP.NET projects I have had a CSS path transform problems with bundling and minification. CSS-files are coming in from external agencies and from different open-source projects and the number of files is so big that it is problematic to go through all of these after updates. I found solution path transform solution that works for me in most cases and it is described here.
Introduction to Microsoft To-Do
Microsoft launched yesterday a new cloud service called Microsoft To-Do. The aim of new service is to provide users with simple and familiar looking tool to plan a day. The new service comes with nice looking web interface and there are also apps available for most popular platforms, including Windows and Windows Phone. (more…)
Using Entity Framework Core in-memory database for unit testing
ASP.NET Core applications can be tested with different testing frameworks and Entity Framework Core makes testing specially easy by removing different technical problems from our way by using in-memory data provider. This blog posts shows how to unit test controllers that use data from Entity Framework Core.