public void Handle(StudyYearCreatedEvent handle)
        {
            StudyYearDto item = new StudyYearDto()
            {
                Id = handle.AggregateId,

                _definedSubjects = handle.definedSubjects,
                Version          = handle.Version
            };

            _reportDatabase.Add(item);
        }
Ejemplo n.º 2
0
 public void Handle(ItemCreatedEvent e)
 {
     _reportDatabase.Add(new DiaryItemDto
     {
         Id          = e.AggregateId,
         Description = e.Description,
         From        = e.From,
         Title       = e.Title,
         To          = e.To,
         Version     = e.Version
     });
 }
Ejemplo n.º 3
0
        void IEventHandler <SubjectDefinedEvent> .Handle(SubjectDefinedEvent handle)
        {
            var item = _reportDatabase.GetById(handle.AggregateId);

            credits          = handle.credits;
            enrolledStudents = handle.enrolledStudents;
            professor        = handle.professor;
            prop             = handle.prop;
            subjectName      = handle.subjectName;
            type             = handle.type;

            _reportDatabase.Add(item);
        }
Ejemplo n.º 4
0
        public void Handle(ItemCreatedEvent handle)
        {
            DiaryItemDto item = new DiaryItemDto()
            {
                Id          = handle.AggregateId,
                Description = handle.Description,
                From        = handle.From,
                To          = handle.To,
                Version     = handle.Version
            };

            _reportDatabase.Add(item);
        }
Ejemplo n.º 5
0
        public void Handle(ItemCreatedEvent eventInstance)
        {
            var item = new DiaryItemDto
            {
                Id          = eventInstance.AggregateId,
                Description = eventInstance.Description,
                From        = eventInstance.From,
                To          = eventInstance.To,
                Title       = eventInstance.Title,
                Version     = eventInstance.Version
            };

            _reportDatabase.Add(item);
        }
Ejemplo n.º 6
0
        public Task Handle(ItemCreatedEvent handle, CancellationToken token)
        {
            var item = new DiaryItemDto
            {
                Id          = handle.AggregateId,
                Description = handle.Description,
                From        = handle.From,
                Title       = handle.Title,
                To          = handle.To,
                Version     = handle.Version
            };

            _reportDatabase.Add(item);
            return(Task.CompletedTask);
        }
Ejemplo n.º 7
0
        public void Handle(RoomBookedEvent handle)
        {
            HotelDto item = new HotelDto()
            {
                Id           = handle.AggregateId,
                Version      = handle.Version,
                CustomerName = handle.CustomerName,
                Email        = handle.Email,
                PhoneNo      = handle.PhoneNo,
                RoomNo       = handle.RoomNo,
                CheckIn      = handle.CheckIn,
                CheckOut     = handle.CheckOut,
                IsCheckedIn  = handle.IsCheckedIn
            };

            _reportDatabase.Add(item);
        }