Multiple environments in ASP.NET 5

APS.NET 5 has introduced new environment variable called ASPNET_ENV. It allows us to control our application behaviour between multiple environments because it’s describing environment on which application is currently working on. We can put there whatever we want but typically it’s set to: Development Staging Production If we are working in Visual Studio 2015 then we can speci…

By Dawid on (tags: asp.net 5, environment, categories: code)

Why does the binding get updated only once in WPF user control?

Recently I struggled on my user control trying to make the dependency property be updated when I change the source of the binding. That confirmed my belief that WPF does not forgive any single developer’s mistake. For the sake of this post I simplified the code. The code of the user control was something like this And the xaml, here I use this control was like this Simple, noth…

By Mirek on (tags: dependency property, user control, WPF, categories: code)

Dependency injection everywhere

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.…

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

Converting Razor views into Pdf

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. 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 such as tex…

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