Blog Posts

  • EF Core 5 Many-to-Many Relationships

    11/12/2020 7:59:12 PM

    If you're a Microsoft developer using EF Core, you are probably really excited about the new feature in EF Core 5 that makes creating many-to-many relationships super simple! Many-to-many relationships in EF Core 5 work intuitively now, so if you have installed the .NET 5 SDK or Visual Studio 2019 16.9 preview 1 you can test the new feature pretty quickly from a .NET Core Console Application...

  • ASP.NET Core 5 Model Binding to C# 9 Record Types

    11/11/2020 6:48:03 PM

    ASP.NET Core 5 was just released and it includes a number of new features. Earlier I mentioned the built-in support for OpenAPI and Swagger UI via Swashbuckle in the new ASP.NET Core 5 Web API Project Template. Another new feature is improved model binding to support C# 9 record types. The C# 9 record type is perfect for use as data transfer objects where immutability is valuable. Using them for...

  • Top-Level Programs in C# 9

    11/10/2020 3:23:01 AM

    Earlier I blogged about two new features in C# 9: C# 9 Init-Only Properties and C# 9 Record Type. Another feature in C# 9 that I didn't originally plan on writing about is top-level programs. However, top-level programs do simplify sharing sample code on a blog by removing boilerplate code and nesting. Therefore, I'll probably be using it quite a bit on my blog. What are Top-Level Programs in C#...

  • Distributed cache, Media crop picker - This week in Orchard (08/11/2020)

    11/8/2020 6:28:00 PM

    This week we will see the new IDocumentStore, which is a cacheable, committable, and cancellable document store allowing to get documents from a shared cache. And don't forget to watch a demo about how you can add an alt text and crop the images of your Media Field!

  • Guard Clauses in Computer Science

    10/30/2020 2:37:38 PM

    While assisting my computer science students on ways to help debug and improve the clarity and runtime of their code, I explained the concept of guard clauses. Guard clauses are true/false expressions (predicates) found at the top of a method or function that determine whether the function should continue to run. Guard clauses test for preconditions and either immediately return from the method...

  • C# 9 Record Type

    10/22/2020 6:24:00 PM

    In the previous C# tutorial I mentioned the new Init-Only Properties in C# 9. I'll be using the new init accessor in this tutorial as well with the new record type in C# 9. Record Types are Not Immutable by Default Before we dive into the cool new record type features, however, I want to mention that most of the C# tutorials are focusing on the record type in terms of immutability. Although it's...

  • C# 9 Init-Only Properties

    10/17/2020 1:39:00 PM

    C# 9 introduces init-only properties that allow you to set properties on a class that can only be set once during object initialization. This is done using a new init accessor introduced in C# 9 as part of a class declaration. public class Person { public string Name { get; init; } public int Age { get; init; } } The Person class can now have it's Name and Age properties set once during...

Send us new blog feeds

Noticed that a blog's feed is missing from the list? 

We would love to add that to the feed list, so please don't hesitate to inform us on the following e-mail adress:

See our privacy policy.