Akos Nagy
Akos Nagy

Posts by author

The specification pattern and variance

The specification pattern and variance

Jun 25, 2019
In a previous post I described the specification pattern, its uses and benefits and also gave a pretty neat implementation. However, there was something that I didn't discuss: the variance aspect of the pattern. It is a very important aspect, but that post was long enough as it
Trying the Azure SignalR service

Trying the Azure SignalR service

Jun 14, 2019
Totally unexpectedly I ran into something "new" in Azure: the Azure SignalR service. It's been out there for a while, but somehow I haven't come across it (to be fair, it is now one of the better-marketed services of Azure). According to the documentation,
Default interface implementation in C# 8

Default interface implementation in C# 8

Jun 12, 2019
A while back the preview version of the last big feature of C# 8 came out: default interface implementation. To be honest, I'm not really a fan of this new option and I have been pretty busy, so I didn't really have the time to check
Duplex service over TCP with WCF

Duplex service over TCP with WCF

May 27, 2019
I was asked by one of my clients that I consult for to help with a TCP-based duplex communicaton solution using WCF. It's been a while since I have blogged about WCF (actually, it's been a while since I have used it), so I though it
Cosmos DB SDK v3 preview

Cosmos DB SDK v3 preview

Apr 17, 2019
A while back I reviewed the EF Core Cosmos DB provider preview. But that's not the only big change coming to Cosmos DB. The actual SDK that allows you access to all the features of the service is also getting an update. While I think it's
C# 8.0 in Visual Studio 2019: what's new

C# 8.0 in Visual Studio 2019: what's new

Apr 6, 2019
This week VS 2019 finally came out and I was going to write a very enthusiastic and very long post about the new language features of C# 8 that I was hoping would also premier with the new IDE. Well, I was wrong on all counts: no new language version,
Countdown to C# 8: Range and Index

Countdown to C# 8: Range and Index

Mar 18, 2019
In my previos post, I discussed one of the new features of C# 8: non-nullable reference types. That feature has been out for a while, so I think most of what can be said has already been said. But this time, I'm taking a look at something even
Implementing the IFormatter interface

Implementing the IFormatter interface

Feb 28, 2019
One of the courses I teach is the standard Microsoft 70-483 exam preparation course. For some reason, the exam still has questions about how the BinaryFormatter and SoapFormatter components work (I'm not even going to try to guess why), so the training material also discusses the related concepts
Awesome Northwind

Awesome Northwind

Feb 5, 2019
Whenever I give a talk at a meetup or teach at a course or just want to try a demo about a data driven technology, my biggest problem (and the biggest nag) is always to get some real(istic) sample data. Thankfully there are sample databases available on the internet
Next level serverless apps with Azure Blobs

Next level serverless apps with Azure Blobs

Nov 6, 2018
I've always been a huge advocate for (and fan of :) ) serverless apps. People often misjudge the concept: serverless doesn't mean that there is no server. I mean, what else would serve requests for the relatively primitive client side? There is a server. Maybe there is even
Updating the blog - again

Updating the blog - again

Oct 8, 2018
A while back I wrote a post about how I had upgraded the blog during the summer vacation with new features. Most of these were actual features, like the search function on the sidebar or the new tags page. I also told you to stay tuned, because more were coming
Upgrading the blog

Upgrading the blog

Sep 24, 2018
It's been a while since I last posted on the blog. The summer was long and I spent more time in natural light :) But now I'm back with a renewed resolve. And I wasn't just lying around all summer — I did some upgrades to
Deserialize into interface

Deserialize into interface

Jun 12, 2018
Not long ago I was teaching a Programming in C# exam prep course. One of the modules involved serialization and a student asked me a question that was quite intriguing: Given the serialized form of an object, is it possible to deserialize it into an object if we only have
What's new in C# 7.3?

What's new in C# 7.3?

May 14, 2018
C# 7.3 came out not long ago. I just had the time to do the update, so I thought I would do a post on it. There are a lot of other posts around about the same topic, but whatever. At least I can present this from my point
Adding logging using Mono.Cecil

Adding logging using Mono.Cecil

May 5, 2018
A while back (actually, it's been a long while) I found an interesting question on Stackoverflow. The question was about adding logging to method calls automatically. Or to rephrase: the question was basically about handling aspect-oriented programming using Mono.Cecil in .NET. So given this piece of code:
Visual Studio icon font

Visual Studio icon font

May 2, 2018
As you can probably see from my blog posts, I'm not really a front-end guy. If push comes to shove, I can manage some basic css, js and html but it's not really my thing. But sometimes, push does come to shove. As I was building
dotNet Falcon update

dotNet Falcon update

Mar 26, 2018
You might have noticed that in the last few months I haven't put out as many posts as I usually do. Well, here's a post explaining why (or rather, trying to make some excuses). I am working on a couple of things (stay tuned for other
Iterating through dictionaries the better way

Iterating through dictionaries the better way

Mar 24, 2018
Using the right collection type at the right place is a challenging task. In my experience, most people just use List<T or Dictionary<TKey,TValue> most of the time, without thinking about other possibilities. Now that's not to say that these two are not
Adding bytes in C#

Adding bytes in C#

Nov 20, 2017
What happens if you run this little piece of code? More specifically, what's the type of the variable 'x'? byte b1=1; byte b2=1; var x=b1+b2; Console.WriteLine(x.GetType()); Well, if you guessed byte, you were wrong. This will actually result in
Extending Linq2Objects GroupBy

Extending Linq2Objects GroupBy

Nov 15, 2017
GroupBy() is one of the most versatile and underrated Linq standard query operator there is. You probably know the "base" version, which takes in a single parameter in the form of an expression (actually, Func, but that's not the point): public static IEnumerable<IGrouping<
Danger zone: true, false or...

Danger zone: true, false or...

Nov 1, 2017
As an MCT I regularly teach courses of different levels. And I have to say, I love teaching — that's the most efficient way to learn :) A participant at one of my advanced courses brought me this little 'problem' (of course, this is not a 'real&
StackOverflow adventures: Don't create non-clustered index for foreign keys with Entity Framework Code First

StackOverflow adventures: Don't create non-clustered index for foreign keys with Entity Framework Code First

Sep 20, 2017
I found an interesting question on stackoverflow: https://stackoverflow.com/questions/46212828/ef6-preventing-not-to-create-index-on-foreign-key OP wanted to find a way to disable index creation for foreign keys. I don't believe there is an easy way to do this; my mind turned right to custom SQL generators and scaffolders. Using
Restoring from BACPAC times out in SSMS

Restoring from BACPAC times out in SSMS

Sep 11, 2017
When moving databases from the cloud to on-premise (usually for some advanced 'hacking', performance-tuning or just experimenting), I often use the BACPAC format. It is basically a zip file that encapsulates the schema and the contents of a database. I can export it with SSMS, and then re-import
Stealing time in SQL Server

Stealing time in SQL Server

Mar 20, 2017
Here's a question for you: what is the output of this simple script in T-SQL if I run it on SQL Server 2016 Developer Edition (or any other edition and any other version, for that matter): declare @t1 datetime='2017-03-20 12:46:37.000'; declare @t2
StackOverflow adventures: Entity Framework Code First advanced mapping scenarios

StackOverflow adventures: Entity Framework Code First advanced mapping scenarios

Mar 5, 2017
A couple of days back I was lucky enough to answer this question on stackoverflow: http://stackoverflow.com/questions/42532083/how-to-map-a-property-to-a-different-table-using-entity-framework So basically the question was about how to split an entity into two tables. And this let me to writing this blog post on advanced mapping scenarios. When you
.NET Workbooks: 101 Linq samples

.NET Workbooks: 101 Linq samples

Mar 1, 2017
Just yesterday I did a post on something called Xamarin Workbooks. In the post I elaborate on how cool this is and how useful I think this tool will be during my classes. Ever since a thread in my brain-process has been working on finding cool new ideas to present
Azure Automation Job for Index Maintenance

Azure Automation Job for Index Maintenance

Feb 14, 2017
Indices are good (yes, technically that is the plural form of index). They help you when you search for things - and that's mostly what databases are all about. But indices are only good if they are maintained. When you do your inserts and deletes, indices can become
Adding custom parts to an xlsx workbook

Adding custom parts to an xlsx workbook

Feb 2, 2017
A while back I came across an interesting task. Basically there was an xml document which we used in one of our applications. It was a special resource file: the structure was maintained by us, but the contents were maintained by the customer. One day we decided that it would
Introducing dotnet Falcon

Introducing dotnet Falcon

Jan 16, 2017
Welcome, dear potential reader. I know you are probably busy, so I'll keep this short. Who am I? I am a software engineer, more specifically, a .NET software engineer. I specialize in back-end development and Azure. The other pieces of information are probably not so relevant, but just