コード例 #1
0
 public void Handle(DepartmentInsertedEvent @event)
 {
     Id          = @event.AggregateId;
     AddedBy     = @event.AddedBy;
     AddedDate   = @event.AddedDate;
     Description = @event.Description;
     ImageUrl    = @event.ImageUrl;
     Importance  = @event.Importance;
     Title       = @event.Title;
 }
コード例 #2
0
        public Department(
            Guid Id,
            DateTime AddedDate,
            string AddedBy,
            string Title,
            int Importance,
            string Description,
            string ImageUrl)
        {
            var @event = new DepartmentInsertedEvent
            {
                AggregateId = Id,
                AddedBy     = AddedBy,
                AddedDate   = AddedDate,
                Title       = Title,
                Importance  = Importance,
                Description = Description,
                ImageUrl    = ImageUrl
            };

            ApplyChange(@event);
        }