tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Using value converter for custom encryption of field on Entity Framework Core 2.1

20 Mar 2018 Encryption, Entity Framework Core, Security

In February I wrote Custom encryption of field with Entity Framework Core post, which in turn was building on idea for Entity Framework 6. Both are easy, but not absolutely straightforward. And another problem is that the encrypted value needs to fit into the datatype of unencrypted value. Finally, the querying is inconvenient. Luckily Entity Framework Core 2.1 (currently in preview) has a solution.

True and false operators in C#

15 Mar 2018 C#

Few days ago, I learned new thing about C#. Apparently, there are “true” and “false” operators and you can overload these. But I also wanted to know what are these good for, given I’ve never heard about these.

Named locks (using Monitor) in .NET: Implementation

19 Feb 2018 .NET, Multithreading/Parallelism/Asynchronous/Concurrency

The Monitor class in .NET might be the most often used “locking” mechanism in C#, mostly because the lock keyword is making it so easy. One thing you might face is unknown number of locks you’re going to need and how to solve this. This is often called named locks or named Monitors, because the lock is bound to some name (or similar value).

Custom encryption of field with Entity Framework Core

5 Feb 2018 Encryption, Entity Framework Core, Security

Almost exactly 5 years ago (yes, that’s 2013) I wrote about Custom encryption of field with Entity Framework. At that time, it was using few tricks to make it work and although it might have looked like magic first time you saw it, it was actually very easy. With Entity Framework Core nowadays we have far more options how the entity can look like and hence how the whole solution can be plugged together. Let’s revisit the topic.

ShowIT 2018 a G2B•TechEd 2018

27 Jan 2018 Presentations & Speaking

Příští týden se konají po roce opět konference ShowIT (Bratislava) a G2B•TechEd (Brno) a myslím, že ještě nějaké místo urvat můžete. Aby se ani jedno město necítilo ochuzené, budu mít na stejné přednášky na obou. Povíme si něco o Azure CosmosDB.

Azure CosmosDB je databáze s globálním škálováním a dostupností. Podporuje několik modelů ukládání a konzistence. Má garantovanou dobu odezvy bez ohledu na data. A to vše jako služba v Azure. Wow! Je to opravdu tak přímočaré? Nebo je nadšení třeba krotit? Vysvětlím vám, jak CosmosDB funguje, na co se dá použít a uvidíme jestli je nadšení podloženo daty (třeba i těmi uvnitř DB 😉).

Tuples goodness in .NET 4.7.1 (.NET Core 2.0 included)

24 Jan 2018 .NET, .NET Core, .NET Standard, C#

One of the few things I was missing when tuples were introduced was some way to generically work with unknown tuples. Mostly to be able to identify tuples, instead of using plain object and also work with items using index of some sort. Luckily, I was probably not the only one and starting .NET 4.7.1 new interesting interface – ITuple – was added (also available in .NET Core 2.0).

About mentoring

26 Dec 2017 Career, Life, Programming in general

Recently in my social bubble, mostly on Twitter, there has been a lot of talking about mentoring. Senior developers mentoring juniors and so on. Although I’m not, by any means, saying mentoring is bad and juniors should leave seniors alone, I’d like to also share my opinion. Shedding some light into this seemingly black-and-white problem.

Entity Framework Core 2.0 provider for Firebird now in beta

11 Dec 2017 .NET, .NET Standard, C#, Databases in general, Entity Framework Core, Firebird, LINQ, SQL, Visual Studio

As I’m sweeping the corners, the work is less glamorous (read: close to zero outside contributions) and every move is harder and harder. But despite all of that, I’m glad to move one step closer to the RTM version of Entity Framework Core 2.0 provider for Firebird and jump to the beta phase.

WUG: Entity Framework Core 2.0 (Olomouc)

5 Dec 2017 Entity Framework, Presentations & Speaking

WUGy v Olomouci opět oživly a můžeme se tedy podívat společně na Entity Framework Core 2.0.

Entity Framework Core 2.0 byl představen nedávno společně s .NET Core 2 a ASP.NET Core 2. Co nového přináší? Jaké jsou změny oproti verzi 1.0 / 1.1? Má smysl verzi 2.0 používat? Jaké jsou pokročilejší features, jaká jsou její omezení… A co například použití s jinými databázemi než jen MS SQL Server?

Těším se na vás 12.12.2017 od 17:00 v Olomouci.

Changing paths in PDB files for source files (and PDB file path in DLL as well)

2 Dec 2017 .NET Core, Roslyn

Although you can disable PDB files generation altogether, it’s good idea to have these. Debugging without PDB files later is so much harder, like if debugging isn’t hard enough already. One thing that might be bothering you, is the source files location that is stored in PDB files. You might want to change these paths – build servers often use random directory names or you might want to simply hide that the project directory on your hard drive has some weird name. 😃

Are static methods faster in execution compared to instance methods (.NET)?

27 Nov 2017 .NET, .NET Core, JIT, RyuJIT

Couple days ago, fellow MVP and colleague @RobertHaken tweeted from frustration about a refactoring (in this case not a good refactoring) into static methods. And I immediately started thinking about scenario where the static method might have some tangible benefits compared to instance method. What a better way to improve method execution than speeding it up? Could this be the case?

Do not await what does not need to be awaited

17 Nov 2017 .NET, C#, Multithreading/Parallelism/Asynchronous/Concurrency

As the usage of await seeps more and more into general C# code, I’m finding some small “leaks” that make me sad sometimes. This one is pretty simple. Looks like that every time somebody uses XxxAsync method, he or she also awaits it. Makes sense, or does it?