你的位置: 码友网首页 / 资讯源列表 / Using C# 9 records as strongly-typed ids

关于[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/

收录时间: 2020-10-31 浏览量: 1851 分类: C#开发

| 0 收藏 | 0