private void Apply(WorkshopAdded @event) { _state = new WorkshopState { Id = new NonEmptyIdentity(Id), Name = new WorkshopName(@event.Name), Status = @event.Status, CityId = new NonEmptyIdentity(@event.CityId) }; }
internal WorkshopAggregate(WorkshopState state) { _state = state ?? throw new ArgumentNullException(nameof(state)); }