code

New feature of .NET Core 2 – Razor Pages

By Dawid on (tags: .NET Core 2.0, Pages, razor, categories: code)

If you are looking for another way of building web applications then Razor Pages are for you! Razor Pages are page based programming model for ASP.NET Core MVC and they makes page focused scenarios easier and more productive.

code

Dependency injection everywhere

By Dawid on (tags: ASP.NET, dependency, injection, IoC, next, razor, categories: code)

Just a few years ago there was just few people who known what dependency injection is. Today it is almost everywhere. Recently I’ve discovered that it can be also used in Razor views – thanks to ASP.NET 5. I will try to show you how we can use that feature on few examples bellow. Probably each of you have been populating drop downs in Razor views with data send from controller.…

code

Converting Razor views into Pdf

By Dawid on (tags: convert, generate, pdf, razor, categories: tools, code)

This post talks about how you can convert Razor views into PDF. There is couple of NuGet packages which we can use to achieve that. I will try to describe couple of them. iTextSharp This library allows us to create documents in Portable Document Format (PDF). Some of the features: - generate documents and reports based on either provided HTML or by manually adding PDF elements …