C#

C# Attributes – introduction

C# Attributes are very popular for ‘decorating’ assembly with some additional data, usually influencing on the application’s behavior or the way data are managed. You probably already used at least some of them – Obsolete, Serializable, Required, Display, MaxLength, RegularExpression, WebMethod are only a few of hundreds available in .Net world. What is more, you can write your own custom attribute and use it like a build-in one. I will write more about this in the next post. Right now, let’s focus on… Continue Reading

Asp.Net Core MVC, Tech

Razor Pages – a simple demo to learn the monster!

In the last post I wrote about one of the .Net Core 2.0 features – Razor Pages. Today, we will crawl a little bit in this mud… I mean, we will write some code.
I chose a simple BMI calculator as a demo project (you can download the code from github). You know, 2 inputs and the code-behind that will tell us if we are very fat or just slightly fat or we are OK and it’s time for another cookie. Because, there is always a time for a cookie, no matter what! Continue Reading

Tech

.Net Core 2.0 – summary

At Monday, we had a highly anticipated release – .Net Core 2.0 ! If it is not enough, we also got a new version of Visual Studio 2017 – update 15.3 (and I will write about it in the nearest feature). So now, I will try to show you the most interesting features of the youngest .Net kid. Continue Reading

Tech

.Net Standard 2.0 is here!

When I started learning .Net Core some time ago I was constantly encountering a ‘.Net Standard’. I knew what it means and that it is (somehow 😉 ) important for me but didn’t really care about it. It’s just the standard, right? Who would care about it, when there is so many new things to discover (yep, I was an ignorant!). I changed my mind the last week – when the .Net Standard 2.0 was finally released.

So, what the .Net Standard is?

It is the standard common for every .Net technology. It ensures that your app/library is compatible with all the .Net technologies (ex. asp.net core, asp.net, xamarin) so you can reuse the same piece of code in more than one product without a need of recompiling it. Continue Reading

Tech

ElasticSearch has a Windows Installer!

Yes, ElasticSearch can be now installed and used much easier (that’s probably not a breaking news because I’m writing about it after one month since I have got a confirmed info) but summer is not the best time for writing a blog’s post 😉.)!

In this post I will focus on the dilemma – when exactly a .msi file can be useful and when it is better to stick to the old fashioned command line. At the end of the post I also added some personal experiences with ElasticSearch logs when working with ES as a service and when running it from a command line. Continue Reading

Tech

Ctrl + E, E – the best Visual Studio shortcut I’ve seen so far!

I can’t be the only person who hates waiting for the code to compile and run… Especially when I want to test only a small part of it! That’s a total waste of time! But good news everyone, I found a way to run a part of my C# code without building the whole project!

Ctrl + E, E – the magical shortcut!

Ok, so if we want to run just the fragment of our code – this is what we do:
1.    Select the fragment of code we want to run. Continue Reading