.NET Annotated Monthly | February 2021
Happy February! Do you know this computing trivia fact? Why is the C language is named C? Because it comes after B. It almost seems too simple. But we’re not kidding!
- Happy 10th Birthday, NuGet!
- The Plan for Entity Framework Core 6.0
- Diagnostics improvements in .NET 5
- Azure Active Directory’s gateway is on .NET Core 3.1
- Windows Terminal Preview 1.6 Release
How to become a better developer by asking questions – Asking questions in a way that will bring about helpful answers is a skill. Whether that question is at popular sites like StackOverflow or when asking a teammate in person, there are some steps you can take to form an effective question to get your answers! Steve Gordon gives us all the details about asking the right questions in this excellent blog post.
How we quickly refactored with Resharper more than 23.000 calls to Debug.Assert() into more meaningful assertions – Patrick Smacchia’s team created the NDepend static analysis tool. Recently, they used ReSharper to refactor a massive amount of assertions! Refactoring is where ReSharper shines. It can help improve the quality of any code base, including those that are mature and large, like NDepend.
With the help of Konrad’s book you too can understand .NET memory management internal workings and pitfalls. You can learn many techniques to address performance and scalability problems in code. Learn to write better code by knowing what’s going on under the hood. Pro .NET Memory Management is the "go to" guide to understanding and working with memory management in .NET.
Tutorials and articles
Enjoy these articles published in the past month that focus on all different types of .NET development. C#, ASP.NET, Xamarin, WinForms, Blazor and more, we got you covered!
- Xamarin Essentials: Features, Advantages and Benefits – Leomaris Reyes blogs about what you need to know about Xamarin including the features, advantages, and benefits of using it.
- Design for Developers—An Introduction to Xamarin Forms – Developers often eschew design, but Leomaris Reyes points out how important design for developers really is.
- Using Partials to Remove Duplication in Razor Pages – Ilyana Smith covers using partials to keep your Razor Pages nice and DRY.
- Select Tag Helper in ASP.NET Core MVC – Tag Helpers are a great way to wrap bits of UI functionality together. Jeetendra Gund shows us how.
- Role-Based Authorization in ASP.NET Core MVC – Authorization and access to resources is necessary for most apps. So check out this post by Golda at CodeMurals who takes us on a quick walk through role-based auth in ASP.NET Core MVC.
- Asynchronous Messaging, Part 1: Basic Distributed Architecture – Async development is a necessary tool in any developers toolbelt. This excellent post by Stephen Cleary demonstrates what is imporant in asynchronous messaging architecture.
- Using ValueTask to create methods that can work as sync or async – To async, or not to async. Jon P. Smith has the answers in this excellent post about using ValueTask that works either way.
- .NET GC Internals mini-series – Konrad Kokosa dives into GC internals for us, so we can make our code as high performing as possible.
- .NET 5 Source Generators Jump Start – Source generators are a new feature in .NET 5 and in this post Khalid Abuhakmeh demonstrates how to get started using them.
- .NET 5 Source Generators – MediatR – CQRS – OMG! – While it all seems like a lot of moving pparts, this post covers some important aspects of using a mediator pattern with MEdiatR, CQRS, and source generatorsin .NET by Tore Nestenius.
- Find Prime Numbers With C# 9 – It’s back to basics with this post by Khalid Abuhakmeh on finding prime numbers in C#. This is great for preparing for job interviews, or for those who are new to algorithms.
- The process, thought and technology behind building a friendly .NET SDK for JetBrains Space – Even if you’re not using Space as a basis for an SDK, this post is great material for SDK building in general. Maarten Balliauw throws down the gauntlet and gives us all the info we need.
- How to update a database’s schema without using EF Core’s migrate feature – This post by Jon P. Smith gives us some advice in updating a database without EF Core migrations. It’s always great to have an alternative way to do things.
- Useful SQL statements when writing EF Core 5 migrations – Here’s a few useful SQL statements Michał Białecki when you’re creating EF Core 5 migrations. Keep these handy.
- Prerendering a Blazor WebAssembly app to static files, without an ASP.NET Core host app – Andrew Lock blogs about Blazor and prerendering, which helps us optimize our apps and make the UI smoother.
- Canceling background tasks when a user navigates away from a Blazor component – Having to cancel actions in an app is an important and frequent occurence. Gérald Barré gives us instructions on how to do this when people navigate elsewhere from your Blazor component.
- Using Blazor in Your Existing ASP.Net Core MVC Applications – Since we can’t just dump our existing projects and start all new greenfield ones, Simon Goodwin shows us how to use Blazor in our existing ASP.NET apps.
- Clean Architecture — Best Exception Handling with Consistent Responses in ASP.NET Core API – Shawn Shi demonstrates the value of consistency as it applies to exception handing. This is an important strategy for APIs.
- Understanding Microsoft’s Docker Images for .NET Apps – Elton Stoneman has a great explanation of Docker images, from the base image and those that build on top of it.
- Video: How to deploy Blazor WebAssembly to Firebase Hosting – Catch this great video by Niels Swimberghe on hosting Blazor WebAssemby in Firebase.
- The Unhandled Exception Podcast Episode 10: F# and Functional Programming – In this podcast, Dan Clarke hosts Scott Wlaschin, Isaac Abraham, and Ian Russell to talk all about F#!
- Download Files with ASP.NET Core Web API and Angular – A lot of ASP.NET developers have to use Angular, and downloading files are incorporated into so many web apps. So the folks at Code Maze have this nice tutorial on how to download in ASP.NET Web API with Angular.
- Using Yarn with ASP.NET Core Projects – Yarn is a web based package and project manager that can help you clean up those unnecessary files before deployment. Post by Joseph Guadagno.
- The Many Flavors of .NET – Sean Killeen breaks down all those questions many people have about .NET. What is .NET Core vs .NET 5? What happened to .NET Standard? How do Mono & Xamarin fit in? It’s all in here.
Related programming tutorials
.NET developers almost always have to know other languages and technologies, so here are articles on technologies that .NET devs are likely to use.
- My Top CSS Tips As Shared on Twitter – Part 1 – This blog post summarizes several tweet tips by Stephanie Eckles on some fun and valuable CSS tricks.
- Seven ways to test for accessibility of your web site with browser Developer Tools – Repeat it with me: Accessibility is important. Accessibility is important. Accessibility is important. Your code isn’t high quality code unless it’s accessible. This post by Christian Heilmann shows seven ways to verify that your software is accessible.
- SQL Server Move Database Files Step By Step – This is something we all have to occasionally do – move database files. Sergey Gigoyan gives walks us through it step bys tep.
- Polymorphic deserialization with System.Text.Json – Josef Ottosson demonstrates how to build variability into your code that deserializes JSON for a wide variety of scenarios.
- Service Oriented Architecture: Commands & Events Explained! – In this video, Derek Comartin succinctly explains service oriented architecture. SOA is an important architectural paradigm for developers of many backgrounds, and this is an excellent primer for it.
- The Case for Codeless Testing – Unit tests aren’t the only way to test! This is a nice post by Karl Hughes covers the value of codeless testing.
— Maarten Balliauw (@maartenballiauw) January 22, 2021
Awesome tip, thank you Maarten!
.NET exception advice:
Q: What should I throw?
Q: What should I catch?
The .NET exception model is a Pokémon based system. Gotta catch them all.
— Jared Parsons (@jaredpar) January 29, 2021
There’s more! Read the entire thread!
Interesting and cool stuff
Articles, tweets, and other items of interest that we’ve found.
- Watch the Rise and Fall of Programming Languages – Sue Gee
- Brain activity while coding differs from processing language or doing maths – Ryan Daws
- Managing Up: How Developers Can Better Communicate to Management Tyler Hakes
- Experiments in 8080 static/jit compilation – Because why not write a JIT compiler for the 8080 CPU? (8080 recompilation into CIL/MSIL) – David Tyler
- The Ultimate Experience: A Guide to the Principles of Sensory Design Micah Bowers
- Learning from Incidents – Jessica DeVita & Nick Stenning
no you misunderstand "bug free" does not mean "free of bugs" it means "we have included the bugs free of charge" cheers mate
— Computer Facts (@computerfact) January 6, 2021
Yes, the bugs are free! :smiley:
Devs watching QA test the product pic.twitter.com/uuLTButB3x
— sanja zakovska 🌱 (@sanjazakovska) January 22, 2021
True story! Testers make you cry! :joy:
And finally, the latest from JetBrains
Here’s a chance to catch up on JetBrains news that you might have missed:
:memo: Take part in the Developer Ecosystem 2021 survey! :memo:
- .NET Tools Guide
- ReSharper 2021.1 roadmap
- Rider 2021.1 Roadmap
- Answering Your Questions: AMA with the .NET Team on Reddit
- Webinar – OOPs, I did it again
- Xamarin, the best way to make NFC Apps – Webinar recording
- OSS Power-Ups: FluentValidation – Webinar recording
- Fluent Validation Plugin
Sharing is caring! So share your content with other readers. Don’t keep it to yourself! Send a Tweet or email with tips or content for publication in future newsletters! Share with a comment here, email me at email@example.com, or drop me a message via Twitter.
Subscribe to Blog updates
Thanks, we've got you!
A Second Set of Bug Fixes: ReSharper 2023.2.2 and Rider 2023.2.2 Are Here!
ReSharper and Rider have just received their second set of bug-fix updates for the 2023.2 release! Let’s take a look at the most important issues that have been resolved in this update. ReSharper For the full list of resolved issues, please refer to our issue tracker. …
ReSharper 2023.3 Early Access Program Begins!
Hello everyone, The Early Access Program for ReSharper 2023.3 has started! Before you download the first EAP build, let’s take a look at what is in store for you. Working with aliases With this first EAP build, we are introducing support for C# 12’s ability for alias directives to refer…
Rider Kicks Off the Early Access Program for the 2023.3 Release!
The Early Access Program for Rider 2023.3 has just begun with the release of the Rider 2023.3 EAP 1 build. There are several ways to get your hands on it: Download and install them from our website. Use the Toolbox App. Install this snap package from the SnapCraft store if you’re using a c…
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…