关于[Using C# 9 records as strongly-typed ids]的摘要:
Entities typically have integer, GUID or string ids, because those types are supported directly by databases. However, if all your entities have ids of the same type, it becomes pretty easy to mix them up, and use the id of a Product where the id of an Order was expected. This is actually a pretty common source of bugs.
原文地址: https://thomaslevesque.com/2020/10/30/using-csharp-9-records-as-strongly-typed-ids/