public int RemoveAnonymousCustomers() { int maxDays = MerchelloConfiguration.Current.AnonymousCustomersMaxDays; var anonymousCustomers = _anonymousCustomerService.GetAnonymousCustomersCreatedBefore(DateTime.Today.AddDays(-maxDays)).ToArray(); _anonymousCustomerService.Delete(anonymousCustomers); LogHelper.Info <string>(string.Format("RemoveAnonymousCustomers - Removed Count {0}", anonymousCustomers.Count())); return(anonymousCustomers.Count()); }
/// <summary> /// Deletes a single <see cref="IAnonymousCustomer"/> /// </summary> /// <param name="anonymous">The <see cref="IAnonymousCustomer"/> to delete</param> public void Delete(IAnonymousCustomer anonymous) { _anonymousCustomerService.Delete(anonymous); }