Exemplo n.º 1
0
 private void CreateCustomerDomainEventHandler(CreateCustomerDomainEvent @event)
 {
     this.Username = @event.Username;
     this.FirstName = @event.FirstName;
     this.LastName = @event.LastName;
     this.Birth = SqlDateTime.MinValue.Value;
 }
Exemplo n.º 2
0
 public static CreateCustomerDomainEvent[] CreateCreateCustomerDomainEvents()
 {
     var sourcedCustomer1 = new SourcedCustomer { ID = AggregateRootId1 };
     var sourcedCustomer2 = new SourcedCustomer { ID = AggregateRootId2 };
     var sourcedCustomer3 = new SourcedCustomer { ID = AggregateRootId3 };
     var createCustomerEvents = new CreateCustomerDomainEvent[]
     {
         new CreateCustomerDomainEvent()
         {
             ID = Id1,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 3,
             Source = sourcedCustomer1
         },
         new CreateCustomerDomainEvent()
         {
             ID = Id2,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 1,
             Source = sourcedCustomer2
         },
         new CreateCustomerDomainEvent()
         {
             ID = Id3,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 2,
             Source = sourcedCustomer3
         }
     };
     return createCustomerEvents;
 }
Exemplo n.º 3
0
 public static CreateCustomerDomainEvent[] CreateCreateCustomerDomainEvents()
 {
     var createCustomerEvents = new CreateCustomerDomainEvent[]
     {
         new CreateCustomerDomainEvent()
         {
             ID = Id1,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 3,
             SourceID = AggregateRootId1,
             AssemblyQualifiedSourceType = typeof(Customer).AssemblyQualifiedName
         },
         new CreateCustomerDomainEvent()
         {
             ID = Id2,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 1,
             SourceID = AggregateRootId2,
             AssemblyQualifiedSourceType = typeof(Customer).AssemblyQualifiedName
         },
         new CreateCustomerDomainEvent()
         {
             ID = Id3,
             Branch = 1,
             Username = "******",
             Timestamp = DateTime.Now,
             Version = 2,
             SourceID = AggregateRootId3,
             AssemblyQualifiedSourceType = typeof(Customer).AssemblyQualifiedName
         }
     };
     return createCustomerEvents;
 }