EF Core Second level ThenInclude missworks

This is a known Intellisense issue with the ThenInclude overload for collection type navigation properties, tracked by the Completion missing members of lambda parameter in fault tolerance case #8237 Roslyn GitHub issue. Until it gets fixed, simply type the name of the property and it will compile successfully and work as expected. .ThenInclude(mu => mu.ParseSubTrees) … Read more

How to read AppSettings values from a .json file in ASP.NET Core

This has had a few twists and turns. I’ve modified this answer to be up to date with ASP.NET Core 2.0 (as of 26/02/2018). This is mostly taken from the official documentation: To work with settings in your ASP.NET application, it is recommended that you only instantiate a Configuration in your application’s Startup class. Then, … Read more

AddTransient, AddScoped and AddSingleton Services Differences

TL;DR Transient objects are always different; a new instance is provided to every controller and every service. Scoped objects are the same within a request, but different across different requests. Singleton objects are the same for every object and every request. For more clarification, this example from .NET documentation shows the difference: To demonstrate the … Read more

Homebrew refusing to link OpenSSL

This is what worked for me: brew update brew install openssl ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/Cellar/openssl/1.0.2j/bin/openssl /usr/local/bin/openssl Thanks to @dorlandode on this thread https://github.com/Homebrew/brew/pull/597 NB: I only used this as a temporary fix until I could spend time correctly installing Openssl again from scratch. As I remember I spent … Read more