/// <summary> /// ReIndexes an Invoice /// </summary> /// <param name="invoice">The <see cref="IInvoice"/> to be re-indexed</param> private static void IndexInvoice(IInvoice invoice) { if (invoice != null && invoice.HasIdentity) { InvoiceIndexer.AddInvoiceToIndex(invoice); } }
/// <summary> /// Deletes an <see cref="IInvoice"/> from the index /// </summary> /// <param name="invoice">The <see cref="IInvoice"/> to be removed from the index</param> private static void DeleteInvoiceFromIndex(IInvoice invoice) { InvoiceIndexer.DeleteFromIndex(((Invoice)invoice).ExamineId.ToString(CultureInfo.InvariantCulture)); }