Using C# 9 records as strongly-typed ids

added by DotNetKicks
10/30/2020 11:29:15 PM

404 Views

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.


0 comments