Exemplo n.º 1
0
        public async Task Consume(ConsumeContext <IDeleteShippingMethodCommand> context)
        {
            var            command        = context.Message;
            ShippingMethod shippingMethod = await EventRepository.GetByIdAsync <ShippingMethod>(command.Id);

            shippingMethod.Delete();
            await EventRepository.PersistAsync(shippingMethod);
        }
Exemplo n.º 2
0
        public bool DeleteContent(string shippingMethodId)
        {
            try
            {
                ShippingMethod method = new ShippingMethod(Convert.ToInt32(shippingMethodId));
                if (method != null && method.ShippingMethodId > 0)
                {
                    ContentLanguage.DeleteByContent(method.Guid);
                    ShippingTableRate.DeleteByMethod(method.ShippingMethodId);
                    ShippingMethod.Delete(method.ShippingMethodId);
                }
            }
            catch (Exception) { return(false); }

            return(true);
        }
        public override bool Delete(long storeId, long entityId)
        {
            ShippingMethod shippingMethod = ShippingMethodService.Instance.Get(storeId, entityId);

            return(shippingMethod.Delete());
        }