Skip to content

EntityAxis v0.1.0

Pre-release
Pre-release

Choose a tag to compare

@cbcrouse cbcrouse released this 13 Apr 23:28
· 8 commits to main since this release

✨ Features

  • Refactored IEntityId<T> to remove set accessor, enabling encapsulated domain entities (init or protected set)
  • Added out keyword to T for covariance support (e.g., use IEntityId<Guid> as IEntityId<object>)
  • Removed Id reset logic from UpdateEntityHandler to give consumers full control over identity handling

⚠️ Breaking Changes

  • Implementations relying on public set for Id must now assign identifiers via constructor or mapping
  • Consumers must ensure Id is not overwritten during update mapping (e.g., configure AutoMapper to ignore Id)

🛠 Migration Notes

  • Update your entities to implement IEntityId<T> using init or protected set

  • Configure your mapping profiles to ignore the Id field during updates

    CreateMap<UpdateOrderModel, Order>()
      .ForMember(dest => dest.Id, opt => opt.Ignore());