public void Add(GiftCodeCampaignAddCommand command, int shardId)
 {
     Name                   = command.Name;
     Notes                  = command.Notes;
     BeginDate              = command.BeginDate;
     EndDate                = command.EndDate;
     GiftCodeCalendars      = command.Calendars.Select(p => new GiftCodeCalendar(p.Date, p.Times)).ToArray();
     Message                = string.Empty;
     AllowPaymentOnCheckout = command.AllowPaymentOnCheckout;
     GiftCodeConditions     = command.Conditions.Select(p => new GiftCodeCondition(p.ConditionType, p.Condition))
                              .ToArray();
     Status         = EnumDefine.GiftCodeCampaignStatus.New;
     CreatedDateUtc = command.CreatedDateUtc;
     CreatedUid     = command.CreatedUid;
     UpdatedDateUtc = command.CreatedDateUtc;
     UpdatedUid     = command.CreatedUid;
     ShardId        = shardId;
     Version        = SystemDefine.DefaultVersion;
 }
        public async Task <CommandResult> SendCommand(GiftCodeCampaignAddCommand command)
        {
            CommandResult commandResult = await _commandService.SendAndReceiveResult <CommandResult>(command);

            return(commandResult);
        }