Aktuelle Artikel

Tools
Introduction: Mocking and Manipulating API Behavior with a Local Proxy Server - Part 1
In this five-part article series, you will learn how to manipulate your API behavior with a local proxy server. When it comes to developing against an HTTPS/REST API, which we do not control ourselves, we face many problems regularly. Issues and hard to provoke edge cases may…
Thinktecture Team
Azure
Azure Functions für .NET-Entwickler vom 01.07.20 [Webinar]
Im Webinar am 01. Juli 2020 zeigte Boris Wilhelms, was das Serverless-Modell ist und wie wir als .NET-Entwickler Azure Functions nutzen können um Serverless-Code zu schreiben. Das Serverless-Modell ist eine von vielen verschiedenen Möglichkeiten, Anwendungen für die Cloud zu…
Boris Wilhelms
Electron
Electron Anwendungen paketieren mit dem electron-packager: Cross-Plattform Desktop Apps - Teil 5 [Screencast]
Thinktecture Cloud-Native- und Infrastructure-as-Code-Spezialist Thorsten Hans erklärt in einer fünfteiligen Screencast-Serie das Framework Electron. Nach den Grundlagen und der Architektur, Developer-Essentials, der UX-Optimierung und Security-Maßnahmen, geht es im letzten Teil…
Thorsten Hans
Ionic
Web-Apps mit Ionic: auf Schienen schneller ans Ziel vom 24.06.20 [Webinar]
Recording des Ionic-Webinars Links: Source Code Online-Demo Kostenloses Cheat Sheet zu Ionic zum Download: Max Schulte hat zum Thema Ionic für Web-Apps ein Cheat Sheet erstellt, auf dem er kompakt alles Wissenswertes zusammengefasst hat. Melden Sie sich hier zu unseren…
Max Schulte
Entity Framework Core
Do Not Waste Performance by Not Using Temp Tables With Entity Framework Core
It has been a while since I released my article about the usage of temp tables in Entity Framework (v6). Meanwhile, Microsoft has released a completely rewritten version of its O/R mapper so my old approach is no longer applicable. But before we learn about a new one, let us…
Pawel Gerr
SignalR
Cross-Platform Realtime Push mit SignalR vom 17.06.20 [Webinar]
Recording des SignalR-Webinars Inhalte Demonstration der Beispielanwendung Was ist SignalR? Hinzufügen von SignalR Reconnect meiner SignalR Verbindung Authentifizierung und Autorisierung Vorteile / Nachteile beim Einsatz von SignalR Q&A Demo-Repository Kostenloses Cheat Sheet…
Patrick Jahr
Web Components
Data Sharing & Framework Integration: Perks & Flaws Series - Part 4
In this four part article series, we are exploring the perks, flaws, and current standards of forming Web Components. This last article will teach you how Web Components can share data and services, and which role frameworks play. Article Series The Motivation for using Web…
Manuel Rauber
Angular
Angular für XAML-Entwickler vom 10.06.20 [Webinar]
Recording des Angular-Webinars Inhalte: Templating und Data Binding Benutzerdefinierte Steuerelemente Datenhaltung Dependency Injection Reaktive Programmierung Debugging Links: Code Sample: Angular-Beispie Code Sample: WPF-Beispiel Kostenloses Ebook "Angular für XAML…
Christian Liebel
Entity Framework Core
Better Entity Framework Core Performance by Reading Execution Plans
Both a LINQ query and an SQL statement are descriptions that state which data should be fetched, but not how.. Sure, when reading LINQ or SQL, we can make assumptions about the performance but not in every case. Some queries are either too fancy or too big to grasp, so our…
Pawel Gerr
Kubernetes
Azure Kubernetes Service (AKS) für .NET-Core-Entwickler vom 03.06.20 [Webinar]
Im Webinar am 03. Juni 2020 erklärte Thorsten Hans am Beispiel von Azure Kubernetes Service (AKS), was Kubernetes ist und wie der Container-Orchestrator funktioniert. Anhand einer exemplarischen .NET-Core-Anwendung hat er veranschaulicht, wie der Weg in das beliebte „Cloud…
Thorsten Hans
Web Components
Lightweight and Fast Web Components with LitElement
What to expect Learn how to create a native Web Component using LitElement Step-by-step explanations How to render your HTML template Adding styles Using asynchronous properties All based on a sample built with Visual Studio Code You can find a running example on stackblitz. What…
Patrick Jahr
Electron
Electron Security-Maßnahmen: Cross-Plattform Desktop Apps - Teil 4 [Screencast]
Thinktecture Cloud-Native- und Infrastructure-as-Code-Spezialist Thorsten Hans erklärt in einer fünfteiligen Screencast-Serie das Framework Electron. Nachdem er bereits in die Grundlagen und Architektur, Developer-Essentials und die UX-Optimierung einführte, geht es im vierten…
Thorsten Hans
Blazor
ASP.NET Core Blazor WebAssembly – Single-Page Applications mit C# vom 27.05.20 [Webinar]
Single-Page Applications (SPAs): bisher implementierte man sie vornehmlich mit JavaScript oder TypeScript, oft im Rahmen eines SPA Frameworks wie Angular oder React. Mittlerweile können nun durch den WebAssembly-Standard theoretisch beliebige Sprachen genutzt werden. Mit dem…
Christian Weyer
Web Components
Web Components – das Ende der SPA-Framework-Ära? vom 20.05.20 [Webinar]
Web Components – ein Begriff, den wir immer öfter hören und lesen werden. Dahinter stehen die Technologien Custom Elements, Shadow DOM und HTML Templates. Zusammen ergeben sie ein natives Komponentenmodell für unseren Browser. Es hilft uns, wiederverwendbare UI-Komponenten zu…
Manuel Rauber
ASP.NET CORE
Einbindung von Versionierung in existierende Projekte: API-Versionierung mit ASP.NET Core 3.0 - Teil 4 [Screencast]
Thinktecture Backend- und API-Spezialist Sebastian Gingter zeigt in dieser vierteiligen Screencast-Serie, wie eine ASP.NET Core 3.0 API versioniert wird. Nach einer Einführung in die API-Versionierung, der Integration in neue Projekte und Hinweisen zur Konfiguration, geht es im…
Sebastian Gingter
BabylonJS
3D-Visualisierung in Web Apps – Angular und BabylonJS in Symbiose vom 13.05.20 [Webinar]
Recording des 3D-Visualisierungs-Webinars Links: Repository Demo-Anwendung Kostenloses Cheat Sheet zu Angular & BabylonJS Integration: Max Schulte hat zur Integration von Angular und BabylonJS ein Cheat Sheet erstellt, auf dem er kompakt alles Wissenswertes zusammengefasst hat…
Max Schulte
Web Components
The Flaws of Web Components (and possible solutions): Perks & Flaws Series - Part 3
The first article of this series introduced into the motivation for using Web Components. After looking at the perks in the second part, we are going to learn about the flaws of Web Components in this article. Please note that with the on-going development of the standards, some…
Manuel Rauber
Entity Framework Core
Entity Framework Core Performance-Optimierung aus der Praxis vom 06.05.20 [Webinar]
Im ersten Teil des Webinars werden die häufigsten Performance-Probleme in Entity Framework Core v2 und v3 aufgezeigt. Im zweiten Teil geht es darum, die generierten SQL-Abfragen zu verstehen, denn nur so kann das Problem erkannt und gelöst werden. Das wichtigste Mittel hierfür…
Pawel Gerr
Angular
Creating Expressive Toast Components with Angular Animations
In some of my recent projects, I have experienced the need and requirements for better user experience by incorporating animations into Angular-based user interfaces. In this article, I am showing you how you can create an expressive toast component with Angular animations…
Konstantin Denerz
ASP.NET Core
ASP.NET Core Web API-Dokumentation mit Swagger vom 29.04.20 [Webinar]
Recording des ASP.NET Core API-Dokumentations-Webinars Inhalte Warum überhaupt Dokumentation? Wie dokumentiere ich eine ASP.NET Core Web API? Technische Details Was sonst? API Clients & Tests generieren Q&A Demo-Repository: https://github.com/thinktecture/tt-webinar-2020-openapi…
Sebastian Gingter
.NET
Bulk Updating .NET Framework Versions in Legacy Projects with Powershell
For one of our customers, I recently had to change the target .NET Framework version from 4.5.1 to 4.6.1 because a new version of some important Nuget package requires .NET 4.6.1. Changing the framework version in newer SDK-based projects is not a problem but the old files, the…
Pawel Gerr
PWA
PWA Deep Dive: Offlineanwendungen im Griff [Webinar]
Christian hat in seinem Webinar am 22.4. über Progressive Web Apps die Offline-Fähigkeit in den Mittelpunkt gerückt - denn: zentrale Eigenschaft jeder Progressive Web App (PWA) ist die Verbindungsunabhängigkeit. Dank dem Service Worker funktioniert die App auch dann, wenn der…
Christian Liebel
ASP.NET CORE
Konfiguration: API-Versionierung mit ASP.NET Core 3.0 - Teil 3 [Screencast]
Thinktecture Backend- und API-Spezialist Sebastian Gingter zeigt in dieser vierteiligen Screencast-Serie wie man seine ASP.NET Core 3.0 API versionieren kann. Nach der Einführung in die Versionierung und der Erläuterung über die Integration in neue Projekte, befasst sich der…
Sebastian Gingter
Web Components
The Motivation for Using Web Components, an Introduction: Perks & Flaws Series - Part 1
Web Components - a term you most probably hear regularly in recent times as a web developer. With the standards of Shadow DOM, HTML Custom Elements, HTML Templates, and, in former times, HTML Imports, there finally is a native component model within the browser. In this four-part…
Manuel Rauber
Web Components
The Perks of Web Components: Perks & Flaws Series - Part 2
In the introduction article to this series, I wrote about the motivation, why to use Web Components. Now we are going to take a closer look at the perks of using them - from a technical and business point of view. If you are interested in all technical features of Web Components…
Manuel Rauber
Infrastructure as Code
Infrastructure as Code mit Terraform vom 15.04.20 [Webinar]
Im Webinar am 15. April 2020 half Infrastructure-as-Code-Spezialist Thorsten Hans nicht nur dabei die Terraform-Basics kennenzulernen. Vielmehr zeigte er, wie Sie eine exemplarische Infrastruktur für mehrere Umgebungen (Development / Staging / Production) erstellen, anpassen und…
Thorsten Hans
Electron
Electron UX-Optimierung: Cross-Plattform Desktop Apps - Teil 3 [Screencast]
Thinktecture Cloud-Native- und Infrastructure-as-Code-Spezialist Thorsten Hans erklärt in einer fünfteiligen Screencast-Serie das Framework Electron. Nachdem er bereits in die Grundlagen und Architektur einführte und Developer-Essentials vorstellte, geht es im dritten Teil um die…
Thorsten Hans
Angular
Nachladen von Angular-Modulen: Eigene Lösung mit Web Components Custom Elements - Teil 3
Diese Artikelserie beschäftigt sich mit dem dynamischen Nachladen von Angular-Modulen. Der letzte Artikel der Serie beschreibt einen Weg des Nachladens mit der Berücksichtigung eines Berechtigungskonzeptes. Die Kommunikation zwischen den dynamischen Modulen und der Hauptanwendung…
Konstantin Denerz
Web Components
How to Create a Native Web Component Without a Framework
What to expect Learn how to create a native Web Component without using a framework Explanation of all steps and essentials points like HTML Templates, Custom Elements and shadow DOM to create a Web Component, based on a sample built with Visual Studio Code. What are Web…
Patrick Jahr
PWA
Project Fugu – neue Fähigkeiten braucht das Web
Mit Project Fugu mischen Google, Microsoft und Intel die Welt der webbasierten Anwendungsentwicklung gründlich auf. Fähigkeiten, die bisher nur nativen Anwendungen oder über Wrapper-Ansätze wie Apache Cordova oder GitHub Electron zugänglich waren, sollen ihren Weg in den Browser…
Christian Liebel
ASP.NET CORE
Einbindung der Versionierung, Controller & Actions: API-Versionierung mit ASP.NET Core 3.0 - Teil 2 [Screencast]
Thinktecture Backend- und API-Spezialist Sebastian Gingter zeigt in dieser vierteiligen Screencast-Serie wie man seine ASP.NET Core 3.0 API versionieren kann. Nach der Einführung in die API-Versionierung, befasst sich der zweite Teil befasst damit, wie Versionierung in ein neues…
Sebastian Gingter
Entity Framework Core
Unnecessary Fuzzy Searches may hurt your Entity Framework Core Performance
After talking about performance issues like N+1 Queries and the Cartesian Explosion that made its comeback in Entity Framework Core 3, we will today look at a performance issue that is not tied to any Entity Framework version but is rather a general one. What do I mean by…
Pawel Gerr
Electron
Electron Developer-Essentials: Cross-Plattform Desktop Apps - Teil 2 [Screencast]
Thinktecture Cloud-Native- und Infrastructure-as-Code-Spezialist Thorsten Hans erklärt in einer fünfteiligen Screencast-Serie das Framework Electron. Nachdem der erste Teil in die Grundlagen und Architektur einführte, geht es im zweiten Teil um Developer-Essentials mit denen Sie…
Thorsten Hans
BabylonJS
Architekturlösung für die Integration von Angular und BayblonJS - Demo und Integrationsbeispiele
In diesem Artikel werde ich zeigen wie Angular und BabylonJS erfolgreich und zukunftssicher integriert werden. Beide Frameworks – Angular als Business-Application-Framework und BabylonJS als Graphics-Engine – sind auf dem jeweiligen Gebiet gestandene Beispiele und damit perfekt…
Max Schulte
Angular
Nachladen von Angular-Modulen: Einführung & Use Cases - Teil 1
Eine hohe Performance und die Sicherheit von Webapplikationen ist für jeden Entwickler ein Dauerthema. Unter JavaScript ist es möglich, für eine hohe Performance nur die gerade benötigten oder wegen der Sicherheit nur die erlaubten Teile der Applikation zu laden. Diese…
Konstantin Denerz
Angular
Nachladen von Angular-Modulen: Lazy Modules und Routen - Teil 2
Diese Artikelserie beschäftigt sich mit dem dynamischen Nachladen von Angular-Modulen. Im zweiten Teil der Serie erfahren Sie wie die initiale Lade- und Start-Performance durch das Nachladen mit Angular Router optimiert werden kann. Die im Artikel referenzierte Demo-Anwendung…
Konstantin Denerz
PWA
Advanced Progressive Web Apps - Push Notifications under Control - Part 2: Push API
This part of our article series on PWA push notifications focuses on the Push API that deals with creating push subscriptions and receiving push messages. If you want to learn more about web-based notifications in general, check out the first part of our series on the…
Christian Liebel
ASP.NET CORE
Warum versionieren, Versionsauswahl, Möglichkeiten: API-Versionierung mit ASP.NET Core 3.0 - Teil 1 [Screencast]
Inhalte des Screencasts Warum API-Versionierung? Gründe, die für die Versionierung einer API sprechen, wann man API-Versionierung (nicht) in Betracht ziehen sollte und welche Kriterien dafür sprechen, eine neue Version einzuführen. Versionsauswahl: Es werden vier verschiedene…
Sebastian Gingter
Entity Framework Core
The performance issue "Cartesian Explosion" made its comeback in Entity Framework Core 3
In Entity Framework Core 3.0/3.1 the SQL statement generation underwent significant changes. As we have seen in the previous post these changes removed both the implicit client-side evaluation and the N+1 Query Problem (which is good!). Unfortunately, these changes (re)introduced…
Pawel Gerr
Kubernetes
Serverless workloads in Kubernetes with KEDA
What is KEDA KEDA stands for Kubernetes Event-driven Autoscaling. It is a thin layer built on top of Kubernetes to scale applications dynamically based on metrics from external systems. Although it comes with first-class support for Azure Functions, it is not limited to Azure…
Thorsten Hans
Blazor
Running Your ASP.NET Core Blazor WebAssembly Application as a Progressive Web App (PWA)
As already outlined in my previous article, a Blazor application almost always has to integrate with the JavaScript world, and especially with the DOM layer in the browser. In this article, I am going to quickly show you how to transform your Blazor WebAssembly application into a…
Christian Weyer
Entity Framework Core
Is "N+1 Queries" still a performance issue in Entity Framework Core 3?
In a previous post we saw that EF 2.1 is highly susceptible to the N+1 queries problem. After the release of a new version of Entity Framework Core (EF) the first question coming to mind is: "Is it still a big issue in EF 3.1?" And if the answer is no, is there anything else we…
Pawel Gerr
Electron
Electron Basics, Architektur, Demo, Vergleich: Cross-Plattform Desktop Apps - Teil 1 [Screencast]
Inhalte des Screencasts Was ist Electron? Ein kurzer Einblick in die Entstehungsgeschichte von GitHub Electron sowie deren Hintergründe. Warum Electron? Wert und Nutzen von Electron für die Entwicklung moderner Cross-Plattform-Anwendungen, die auf Desktop-Systemen ausgeführt…
Thorsten Hans
BabylonJS
Performance optimization: Integrating BabylonJS 3D engine into an Angular business application - Part 2
Welcome to the second part of this blog post series. If you want to learn how to basically integrate BabylonJS into Angular (or vice versa) please take a look at part 1. In this post, our goal is to make your application and the interactions fast! Article Series Integration…
Max Schulte
PWA
Advanced Progressive Web Apps - Push notifications under control - Part 1: Notifications API
For sure, Progressive Web Apps (PWA) are one of the hottest topics on the web today. A PWA should feel like a real app, including the ability to show push notifications. In this blog series, you will learn how to implement push messaging in your PWA or website using the Push API…
Christian Liebel
IdentityServer
SameSite Cookies in a Nutshell
In my last articles on how to prepare your IdentityServer for Chromes SameSite Cookie changes and how to correctly delete your SameSite Cookies in Chrome 80 I explained the changes that Chrome did to its SameSite Cookie implementation, how that might affect you and how to avoid…
Sebastian Gingter
BabylonJS
Integration Basics: Integrating BabylonJS 3D Engine Into an Angular Business Application - Part 1
In this two parts article, I will demonstrate how easy it can be to integrate a 3D engine like BabylonJS into a business application built with a SPA framework like Angular. You will see how those two frameworks can interact with each other and where possible performance pitfalls…
Max Schulte
Blazor
Re-Using Angular components in a Blazor WebAssembly application using Angular Elements - Web Components custom elements, FTW!
Microsoft's Blazor WebAssembly toolkit is one of the new kids on the block in WebAssembly land. For many developers WebAssembly (or WASM) is the origin for a new revolution in the web. We can finally(?) use other languages and frameworks than JavaScript to run applications in a…
Christian Weyer
IdentityServer
How to correctly delete your SameSite Cookies in Chrome (80+)
In my last article I explained how the changes in Chrome 80 (February 2020) can break your existing web sites or web applications, because SameSite cookies will be treated differently. In that post I focused on how to correctly set your cookies and how to mitigate…
Sebastian Gingter
IdentityServer
How to prepare your IdentityServer for Chrome's SameSite cookie changes - and how to deal with Safari, nevertheless
First, the good news: In February 2020 Google is going to release Chrome 80. This release will include Google's implementation of 'Incrementally better Cookies', which will make the web a more secure place and helps to ensure better privacy for users. The bad news is that this…
Sebastian Gingter
RxJS
RxJS in Angular - Antipattern 2 - Stateful Streams
This is the second part of a small series, in which I want to share some pitfalls we discovered multiple times in code reviews over the years, as well a few patterns we identified as helpful. In the first part we discussed how nesting subscriptions can be harmful. Stateful…
Yannick Baron
RxJS
RxJS in Angular - Single result data streams and async pipe
In the first and second part of this small series, we have discussed implementations that have flaws and can introduce side-effects to our data flow. We have learned how combining our streams and modeling our our data flow to yield a single result helped with solving the…
Yannick Baron
Entity Framework Core
Entity Framework Core 3.0 - "Hidden" GROUP BY Capabilities (Part 2)
In the previous blog post we used a navigational property to work around the limitations of the extension method . The problem is, there is not always such a property we can use for grouping. Especially, when following domain driven design practices, a bidirectional navigation is…
Pawel Gerr
RxJS
RxJS in Angular - Antipattern 1 - Nested subscriptions
Working on numerous Angular projects over the past couple of years, it has become evident, that a lot of developers still have a hard time working with RxJS which finds its use in Angular. While RxJS is a very powerful tool, it comes with a lot of operators and a whole paradigm…
Yannick Baron
Entity Framework Core
Entity Framework Core 3.0 - "Hidden" GROUP BY Capabilities (Part 1)
With Entity Framework Core 3.0 (EF) the internal implementation of the LINQ query translation has been changed a lot. So, some queries that didn't work previously are working now and some that worked are not working anymore. :) The LINQ extension method is a special one…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Getting more Deadlock Information with named Transactions
Whether in an application in production or in integration tests on CI, the deadlocks are virtually unavoidable. The behavior of a deadlock depends on the database (MS SQL Server, MySQL, etc)  and the isolation level (like Snapshot Isolation). Some of the databases are blocking…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Beware of Lifetime Extension of TransactionScopes using C# 8.0
In the blog post Entity Framework Core: Use TransactionScope with Caution! we saw a few cases we have to be aware of when using . Here is another one that can lead to an exception when using the new C# 8.0 feature: . First, we look at a code snippet without C# 8.0 feature: Which…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Include Filters
The Entity Framework Core (EF) extension method provides us the ability to load additional data besides the entities we are querying for. For example: loading products along with their translations. In some use cases we want to load all translations for the requested products…
Pawel Gerr
ASP.NET
ASP.NET Core 3.0 - Custom JsonConverter for the new System.Text.Json
With the introduction of ASP.NET Core 3.0 the default JSON serializer has been changed from Newtonsoft.Json to System.Text.Json. For projects and libraries switching to the new JSON serializer this change means more performance and the opportunity to rewrite our . Serialization…
Pawel Gerr
.NET
C# 8 - Nullable Reference Types in .NET Standard < 2.1 and .NET 4.x
By switching the to and setting to in the csproj-file we are now benefiting from the introduced with the latest version of C#. By enabling this new feature all type members, input and output parameters are considered to be not-null. If some members or parameters, like can…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Making RowNumber (more) useful
In the blog post ROW_NUMBER Support we saw how to implement a custom function and in the previous post Improved Value Conversion Support we realized that inserting and selecting custom types is one thing but using them for filtering is something totally different. Let's take a…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Improved Value Conversion Support
Entity Framework Core (EF) 2.1 introduced a new feature called Value Conversion. Now, we are able to map custom .NET types to a type the database understands and vice versa. This long-awaited feature is especially popular among software engineers following the domain driven…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Custom Functions (using HasDbFunction)
In the previous post (Custom Functions - using IMethodCallTranslator) we looked at the more flexible approach that requires some boilerplate code. For the usage of a custom function in a project, especially if there are no plans to make the function public then the sacrifice of…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Custom Functions (using IMethodCallTranslator)
In the previous blog post (Entity Framework Core: ROW_NUMBER Support) we saw how to use the custom function with Entity Framework Core (EF). Now, we will look into the implementation. In the next and the last post of this series we will look ath the 2nd approach that uses the…
Pawel Gerr
Entity Framework Core
Entity Framework Core - ROW_NUMBER Support
There are some use cases that force me to use raw T-SQL instead of using LINQ. One of them is the need for ROW_NUMBER. But not anymore... One again, due to great work of Entity Framework (EF) team we are able to add more capabilities to EF quite easily. At the moment there are…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Contains Check via Temp Tables
Motivation One of the main queries in my projects is to select multiple database records having a collection of some kind of identifiers. Most of the time it works very well using the method . The query above is translated by the Entity Framework Core (EF Core) to clause: Most…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Isolation of Integration Tests
When working with Entity Framework Core (EF) a lot of code can be tested using the In-Memory database provider but sometimes you want (or have) to go to the real database. For example, you are using not just LINQ but custom SQL statements due to performance reasons or you want to…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Changing DB Migration Schema at Runtime
In the first part of this short blog post series we looked at how to change the database schema of a DbContext, now it is all about changing the schema of the EF Core Migrations at runtime. The samples are on Github: PawelGerr/EntityFrameworkCore-Demos Given is a  implementing…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Use TransactionScope with Caution!
One of the new features of Entity Framework Core 2.1 is the support of TransactionScopes. The usage of a  is very easy, just put a new instance in a , write the code inside the block and when you are finished then call to commit the transaction: But, before changing your code…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Changing Database Schema at Runtime
At the moment there is no built-in support for changing the database schema at runtime. Luckily, Entity Framework Core (EF) provides us with the right tools to implement it by ourselves. The demos are on GitHub: github:PawelGerr/EntityFrameworkCore-Demos Given are a database…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Inheritance - Table-per-Type (TPT) is not supported, is it? (Part 2 - Database First)
In the previous post we have created 2 Entity Framework Core (EF Core) models with a code first approach. One model was using the Table-per-Hierarchy (TPH) pattern and the other one Table-per-Type (TPT). In this post we want to approach a more common scenario we see in customer…
Pawel Gerr
Entity Framework Core
Entity Framework Core - Inheritance - Table-per-Type (TPT) is not supported, is it? (Part 1 - Code First)
With O/R mappers there are a few patterns how a class hierarchy can be mapped to a relational database. The most popular ones are the Table-Per-Hierarchy (TPH) and the Table-Per-Type (TPT) patterns. The Entity Framework Core 2.x (EF Core) officially supports the Table-per…
Pawel Gerr
Entity Framework Core
Entity Framework Core 2.1 Performance - Beware of N+1 Queries (Revisited)
In the previous post we have identified some Entity Framework (EF) LINQ queries that are affected by so called N+1 queries problem. In the meantime a new version (2.1-RC1) of Entity Framework has been released so we check the SQL statement generation yet another time. Samples…
Pawel Gerr
Entity Framework Core
Entity Framework Core Performance - Beware of N+1 Queries
After working with Entity Framework 6 (EF 6) for several years, a software developer can predict the SQL statements being generated by EF just by looking at the LINQ queries. With Entity Framework Core (EF Core) the SQL statement generation has changed - in some cases for the…
Pawel Gerr
.NET Core
(ASP).NET Core in production - Changing log level temporarily - 2nd approach
In the previous blog post I talked about how to change the log level at runtime by coupling the (or rather the ) with the . However, the solution has one drawback: you need to change the file  for that. In this post we will be able to change the log level without changing the…
Pawel Gerr
.NET Core
.NET Core in production - Changing log level temporarily
When running the application in production then the log level is set somewhere between and . The question is what to do if you or your customer experiences some undesired behavior and the logs with present log level aren't enough to pinpoint the issue. The first solution that…
Pawel Gerr
ASP.NET
ASP.NET Core - Update to Autofac 4.6.1 recommended - more than a bugfix release
If you are using Autofac in your ASP.NET Core application then I recommend to update Autofac to version 4.6.1. This bugfix release brought a change how child scope handle additional registrations so that some errors like just disappear. With additional registrations I mean the…
Pawel Gerr
ASP.NET
ASP.NET Core in production - Graceful shutdown and reacting to aborted requests
In the previous post "ASP.NET Core in production: Take back control of your web app" I mentioned that getting hold if the dependency injection (DI) is just one step of many to improve the architecture of your web applications. Today well will look into 2 other aspects that are…
Pawel Gerr
ASP.NET
ASP.NET Core in production - Take back control of your web app
With ASP.NET Core the setup of a new MVC or a Web API project is essentially a 2-liner. The standard setup you can find in most tutorials is ideal for demos, workshops or simple web apps but is insufficient for complex applications. The standard setup looks as follows: The rest…
Pawel Gerr
ASP.NET
ASP.NET Core - Beware - Singleton may not be singleton
If you register a type as a singleton then you expect just 1 instance of this type in your whole application. What you may not know is that ASP.NET Core is creating 2 instances of during building of the that may lead to 2 instance of your "singleton". This is the case if you…
Pawel Gerr
PWA
Playing Hide & Seek with my Service Worker Instance!
If you are working with Service Workers for the first time you'll probably have noticed that the Service Worker's functionality can be found on different objects. This can be a little bit confusing. First of all the API is a little bit misleading because is not an instance of…
Steffen Jahr
ASP.NET Core
ASP.NET Core Web API Performance - Throughput for Upload and Download
After working with the new ASP.NET Core server and the for a while in a number of projects I run into some performance issues. Actually, it was a throughput issue. It took me some time to figure out whether it is the server or the client responsible for the problems. And the…
Pawel Gerr
Entity Framework Core
Entity Framework Core Migrations - Assembly Version Mismatch
If you have switched your .NET Core project from to (MSBuild) and updated the nuget packages then you may run into an issue when executing some of the -commands. I got the following error after executing : The problem is that some of my (3rd party) dependencies are using…
Pawel Gerr
.NET
Strongly-typed Configuration for .NET Core - with full Dependency Injection support
Configuration is one of the most prominent cornerstones in software systems, and especially in distributed systems. And it has been a point for discussions in .NET for quite some time. In one of our projects we have built a solution that lets different applications in different…
Pawel Gerr
ASP.NET
ASP.NET Core with IIS - Setup Issues
If you are planing to run an ASP.NET Core application with IIS then this blog post might be worth a glance. These are a few issues I run into ... 1. Targets in .xproj-file If the project started with RC1 or earlier version of .NET Core then check for correct targets. Open the…
Pawel Gerr
ASP.NET
(ASP).NET Core Dependecy Injection - Disposing
After several years of using the same Dependency Injection (DI) framework like Autofac you may have a good understanding how your components, implementing the interface IDisposable, are going to be disposed. With the nuget package Microsoft.Extensions.DependencyInjection the new…
Pawel Gerr
.NET
.NET Abstractions - It's not just about testing!
With the introduction of .NET Core we got a framework that works not just on Windows, but on Linux and macOS as well. One of the best parts of .NET Core is that the APIs stayed almost the same compared to the old .NET, meaning developers can use their .NET skills to build cross…
Pawel Gerr
Entity Framework
Entity Framework - Prevent redundant JOINs - watch your LINQ !
Fetching one record from a collection using navigational properties in Entity Framework may lead to unnecessary JOINs. To show the problem we need two tables Products and Prices. The query shown below is fetching products along with their first price. Looks simple. Lets look at…
Pawel Gerr
Angular
Mimicking $interpolate - An Angular 2 interpolation service
In an Angular 1 application we have been creating for one of our customers we used the $interpolate service to build a simple templating engine. The user was able to create snippets with placeholders within the web application to use these message fragments to compose an email to…
Pawel Gerr
Entity Framework
Entity Framework - High performance querying trick using SqlBulkCopy and temp tables
Implementing database access with Entity Framework is pretty convenient, but sometimes the query performance can be very poor. Especially using navigational properties to load collections leads to significantly longer execution times and more I/O. To see the impact of the loading…
Pawel Gerr
.NET
.NET Core - Lowering the log level of 3rd party components
With the new .NET Core framework and libraries we have got an interface called Microsoft.Extensions.Logging.ILogger to be used for writing log messages. Various 3rd party and built-in components make very good use of it. To see how much is being logged just create a simple Web…
Pawel Gerr
JavaScript
Drag & Drop vs. MouseEvents - A misunderstanding
A few weeks ago one ouf our customers asked me what he can use if he wanted to move (in his words drag and drop) a HTML element. He told me that he found several examples using jQuery respectively jQuery UI but he wanted to have a plain solution without jQuery. His first approach…
Steffen Jahr
AngularJS
AngularJS - Dynamic Directives
In this post, we will look into an approach for exchanging the definition of an AngularJS directive, i.e. the template, controller, compile/link functions etc., after the application has been bootstrapped whereby carrying out a full reload is not an option. Assume that you have…
Pawel Gerr