Steven Giesel 1/25/2026

Sometimes you just need extensions methods to model your stuff

Read Original

The article details a C# development challenge where a generic Optional type is used for partial updates of an entity. It explains the problem of handling nullable vs. non-nullable properties in a DTO and presents a solution using a custom extension method to properly resolve type mismatches and nullability constraints.

Sometimes you just need extensions methods to model your stuff

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
Quoting Thariq Shihipar
Simon Willison 2 votes
2
Container queries are rad AF!
Chris Ferdinandi 1 votes
3
Top picks — 2026 January
Paweł Grzybek 1 votes
4
In Praise of –dry-run
Henrik Warne 1 votes
6
Vibe coding your first iOS app
William Denniss 1 votes