News

You can also implement value objects using records in C#. To do this, you use the record keyword to define a record type that encapsulates data much the same way we did with the Author class earlier.
For more information on how to perform lazy loading, you can take a look at my article on lazy initialization in C#. Data Transfer Objects typically don’t contain any business logic — they ...
You now have data that is guaranteed to be identical taking up twice as much space as necessary. But, in C# 9, you can just create a record and get a value object that does everything you want. Here's ...