コード例 #1
0
ファイル: Cargo.cs プロジェクト: PeterButzelaar/NCQRSWorkshop
 protected void OnCargoCreated(CargoCreatedEvent e)
 {
     _origin = e.Origin;
     _destination = e.Destination;
     _weight = e.Weight;
     _size = e.Size;
 }
コード例 #2
0
ファイル: Cargo.cs プロジェクト: PeterButzelaar/NCQRSWorkshop
        public Cargo(Guid id, string origin, string destination, float weight, float size)
            : base(id)
        {
            var e = new CargoCreatedEvent(id, origin, destination, weight, size);

            ApplyEvent(e);
        }