Architect.DomainModeling (nuget): A complete Domain-Driven Design (DDD) toolset for implementing domain models, including base types and source generators.  https://github.com/TheArchitectDev/Architect.DomainModeling  Release notes:  2.0.0: - BREAKING: Generated DummyBuilders now use UTC datetimes for generated defaults and for interpreting datetime strings. - Semi-breaking: Generated types no longer add [Serializable] attribute, since there would be no way to remove it. - Generated types are now easier to read, using ?-based nullables instead of attributes. - Identity and WrapperValueObject<TValue> types now honor the underlying type's nullability in ToString(). - Identity and WrapperValueObject<TValue> types' generated System.Text.Json serializers now implement ReadAsPropertyName() and WriteAsPropertyName(), enabling serialization of such types when they are used as dictionary keys (only in .NET 7 and up). - DummyBuilderGenerator: WrapperValueObject<string> and IIdentity<string> constructor params now get a string value equal to the param name instead of the type name (e.g. "FirstName" and "LastName" instead of "ProperName" and "ProperName"). - Added some missing nullable annotations. - IIdentity<T> now has an explicit notnull constraint (whereas before this was only indirectly enforced by its IEquatable<T> interface). - Identity types now serialize additional large numeric types as string, to avoid JavaScript overflows: UInt128 and Int128. - Identity types generated for Entity<TId, TIdPrimitive> now have a summary. - Identity types wrapping a non-nullable string now explain the non-nullness for default struct instances, in summaries for ToString(), Value, and convert-to-string operators. - Identity types: Fixed a bug where string representations of numeric IDs could contain meaningless decimal places, e.g. when a decimal was internally represented as 1.0. - Identity types: Fixed a bug in the generated JSON converters for IIdentity<decimal>, where an incorrect ArgumentNullException or NullReferenceException could be thrown instead of the expected JsonException/JsonSerializationException. - Fixed a compile-time bug where the source generator for ValueObjects would create non-compiling equality/comparison for properties of types created solely by source generators. - Fixed a potential bug in Entity<TId>, where entities of different types could be considered equal if they used the same TId (even though the latter is not advisable). - Added support for trimming. - Minor performance optimizations.  1.0.3: - Improved performance by using incremental generators. - Made it easier to navigate into the right file, thanks to a comment just before the generated type definition. - Generated source now uses the common .g.cs suffix. - Fixed a compile-time bug where [Wrapper]ValueObject inheritance combined with the IIdentity interface would cause an unwarranted warning. - Fixed a compile-time bug where the source generator would fail to acknowledge a type with the SourceGeneratedAttribute on one partial and the required base type on another. - Fixed a compile-time bug where the source generator would crash if the partial to be extended already consisted of multiple partials. - Fixed a compile-time bug where the DummyBuilder source generator would crash if it encountered a constructor taking a parameter that is a source-generated IIdentity. - Reduced the need for duplicate type names to require a uniquefier in the generated source name.
Keywords: DDD|Domain-Driven|Design|Entity|ValueObject|value|object|DomainModeling|domain|modeling|SourceGenerator|source|generator