Category Archives: Programming

Everything about software development, architecture, etc.

How to reuse lambda parameter across multiple combined expressions

If you’re having multiple separately defined expressions having common lambda parameter like these: And trying to combine them into one and to reuse the said parameter like this: Then you’ll likely get an exception: Unhandled Exception: System.InvalidOperationException: variable ‘u’ of … Continue reading

Posted in Programming | Tagged , | Leave a comment

Durable queue in Azure Service Fabric using WebJobs, Part 2: Web API

This the second post in a series about Durable queue in Azure Service Fabric using WebJobs: Part 1: Introduction to Asynchronous Operations Part 2: Web API Now let’s create another stateless service which will host the Web API. I used … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Durable queue in Azure Service Fabric using WebJobs, Part 1: Introduction to Asynchronous Operations

This the first post in a series about Durable queue in Azure Service Fabric using WebJobs: Part 1: Introduction to Asynchronous Operations Part 2: Web API The built-in into Azure Service Fabric (shortly ASF, or just SF) actor model and … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Documentation as a Feature, Documentation is a Feature

TL;DR: documentation should be treated, i.e. planned, estimated and maintained, as any other functional part of a project. I don’t always write documentation but when I do, I believe it’s more important it to be up-to-date than to exist. That … Continue reading

Posted in Programming | Tagged , | Leave a comment

How to move data from SQL Server to ADLA table using ADF

In Universal Store Team, the Universal Payout Platform – Earnings Calculations project, we need to move data from on-prem SQL Server, as well as SQL Server within an Azure vnet and SQL Azure, to the Cloud. As our storage in … Continue reading

Posted in Programming | Tagged , | Leave a comment

How to deploy Azure Data Factory pipeline and its dependencies programatically using PowerShell

Since ADF unfortunately doesn’t provide a built-in way for automated deployment, to do this you have to write a custom script. Then you can run it on build server such as VSTS or TeamCity. If you’re in the interactive mode, … Continue reading

Posted in Programming | Tagged , | 16 Comments

How to enable tracing in ASP.NET Web API using Application Insights

Excert Continue reading

Posted in Programming | Tagged , , | Leave a comment

The ObjectContext instance has been disposed and can no longer be used for operations that require a connection

TL;DR: Don’t return task before disposing context, await it instead If you’re getting an Entity Framework exception: System.ObjectDisposedException: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection at System.Data.Entity.Core.Objects.ObjectContext.ReleaseConnection() at System.Data.Entity.Core.Objects.ObjectContext.d__3d`1.MoveNext() … Continue reading

Posted in Programming | Tagged , | Leave a comment

Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference

TL;DR: Add reference to Newtonsoft.Json.dll in every project If you’re getting a runtime exception: System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly … Continue reading

Posted in Programming | Tagged | Leave a comment

How to generate ids programmatically using SQL Server and Entity Framework

TL;DR: create a sequence and execute stored proc to read from it Generating ids in the database is used to be the default and near to the only one approach but now days this trend is fading away. Here’s some … Continue reading

Posted in Programming | Tagged , | Leave a comment