Example #1
0
        protected virtual IFacilityStateCreated Map(ICreateFacility c)
        {
            var stateEventId        = new FacilityEventId(c.FacilityId, c.Version);
            IFacilityStateCreated e = NewFacilityStateCreated(stateEventId);

            e.FacilityTypeId             = c.FacilityTypeId;
            e.ParentFacilityId           = c.ParentFacilityId;
            e.OwnerPartyId               = c.OwnerPartyId;
            e.DefaultInventoryItemTypeId = c.DefaultInventoryItemTypeId;
            e.FacilityName               = c.FacilityName;
            e.PrimaryFacilityGroupId     = c.PrimaryFacilityGroupId;
            e.OldSquareFootage           = c.OldSquareFootage;
            e.FacilitySize               = c.FacilitySize;
            e.FacilitySizeUomId          = c.FacilitySizeUomId;
            e.ProductStoreId             = c.ProductStoreId;
            e.DefaultDaysToShip          = c.DefaultDaysToShip;
            e.OpenedDate            = c.OpenedDate;
            e.ClosedDate            = c.ClosedDate;
            e.Description           = c.Description;
            e.DefaultDimensionUomId = c.DefaultDimensionUomId;
            e.DefaultWeightUomId    = c.DefaultWeightUomId;
            e.GeoPointId            = c.GeoPointId;
            e.Active    = c.Active;
            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            var version = c.Version;


            return(e);
        }
 void IFacilityApplicationService.When(ICreateFacility c)
 {
     this.When((CreateFacilityDto)c);
 }
Example #3
0
        public virtual void Create(ICreateFacility c)
        {
            IFacilityStateCreated e = Map(c);

            Apply(e);
        }
Example #4
0
 public virtual void When(ICreateFacility c)
 {
     Update(c, ar => ar.Create(c));
 }