Entity Framework Core: Querying views, but manipulating tables I had a use case for EF Core, where I wanted to use Entity Framework Core to query a database view while supporting updating the database through its classic add/update/delete methods. Specifically, I’d like to enrich my entities with extra info, such as looking up a value,
EntityFramework Core - Composite key filtering In EF Core, you can easily filter to a list of known values, by using LINQ like the following: int[] ids = { 1, 3, 7 }; myContext.Posts.Where(s => ids.Contains(s.Id)) But what to do, when the list of values you want to filter consists of two or
tooling Introducing Elephant Projects - Cross-repository refactoring At my place of work, we maintain a product which has 413 projects (.csproj files) spread over 15 different repositories. Some repositories are big (our SDK), and others are smaller (utilities for single purposes). One of the issues I face with this scale, is that at times we want to
github GH Mass-administration: Terraform This is a part of my guide to how I manage multiple Github repositories. This post focuses on configuring repository settings on Github using Terraform. Back to main guide. For my use case, I need to control default settings as well as maintaining secrets that will be used in actions.
github GH Mass-administration: Content This is a part of my guide to how I manage multiple Github repositories. This post focuses on streamlining content in those repositories, such that they all use the same Github workflows, have common build properties set and so on. Back to main guide. Declaring sets of files For my
github Featured Mass-administration of Github repositories This is a collection of notes for how I manage multiple Github repositories. All repositories under my account, are managed this way. Features I need the following: * Standardize repositories - when I want to push new topics, change the wording of descriptions, use new settings or disable others - I
github Featured Consuming nuget packages from my Github This is a short guide on how to consume packages from my Github packages feed. The official docs are here. Notes: * How to find your NuGet.Config. * My package feed is located at https://nuget.pkg.github.com/LordMike/index.json. * You must authenticate to this feed with an access
guides Featured Renaming an index in Elastic (slight hacks) We've all been there .. the pet project has grown, the index is too large and you want to use fancy features like aliases with write-active indices, but you cannot reuse the name of the index for your new alias - so you'll have to modify your
guides Move WSL to different drive Windows Subsystem for Linux is awesome, but it may benefit from storing its drives (VHD's) on another disk. List containers You can run this command to list all containers. Each container has a volume attached (VHD) and can operate independently. Usually, you'll have one container for
Space Engineers 01.172 -API Documentation For reference, here is a SandCastle produced help file for Sandbox.Common from SE 01.172. The file is here: Documentation.chm. Interesting starting points: * Sandbox.ModAPI.IMyGridProgram the scripts ingame inherit from this.
guides Space Engineers, figuring out the API This is a short note on how we can develop scripts for use in the game Space Engineers. Background A friend suggested Space Engineers to me, so I bought it and after a while of scavenging, mining and dying - I tried out the Programmable Block. I was in awe
guides Deserializing different types based on properties, with Newtonsoft.Json Sometimes we're presented objects in JSON that do not directly map to a strongly typed object. An example of that is given here: [{ "type" : "Car", "wheels" : 4, "trunk" : true }, { "type" : "Bicycle", "wheels" : 2, "
guides Detecting mismatched objects with Newtonsoft.Json One common problem with API Client Libraries is that their strongly typed objects don't match the response objects that the API gives. I faced this issue with TMDbLib and wanted to solve it in my unit tests. It turns out that we relatively easily can work in a
letsencrypt Lets Encrypt organized for reverse nginx proxy This is a short post on using Let's Encrypt to get TLS certificates for use in Nginx virtual host sites. This post assumes: * Ubuntu * NGINX (running a number of domains) * Some form of scheduler (Cron, Rundeck, ..) Let's Encrypt Let's Encrypt is an initiative meant