C# Class Unipluss.TransactionService.DAL.TransactionRepository

Inheritance: ITransactionRepository
Afficher le fichier Open project: unipluss/invoicetransactions Class Usage Examples

Protected Properties

Свойство Type Description
tableRequestOptions Microsoft.WindowsAzure.Storage.Table.TableRequestOptions

Private Properties

Свойство Type Description
AddReIndexRequestIfNeeded void
EnsureTransactionHasCustomerInternalID void
SerializeTransactionAndAddToQueue void

Méthodes publiques

Méthode Description
AddOrUpdateTransaction ( Transaction t ) : void

Adds new transaction to table storage or updates an existing item. Throws exception when item is not valid, resolving customer external ID failed or if table storage operation fails.

AddOrUpdateTransaction ( TransactionTableEntity ent ) : void

Inserts or updates (using merge operation) the transaction table entity.

AddOrUpdateTransactionBatch ( IEnumerable batch ) : void

Inserts or updates (using merge operation) a batch of transaction table entities. Also generates IDs for items that do not have them and sets Date to DateTime.Now if it is null.

AddOrUpdateTransactionTotalsItem ( ) : void
AddReIndexableItemBatch ( ) : void
AddTransactionBatchToUpdateQueue ( IEnumerable batch ) : IEnumerable

Adds a batch of transaction items to WebJob queues. Workers process each queue item and add them to transaction table and search index. Can also be used for updating existing items if Transaction.ID is specified. Also generates IDs for items that do not have them and sets Date to DateTime.Now if it is null.

AddTransactionToUpdateQueue ( Transaction t ) : Transaction

Adds the transaction item to WebJob queues. Workers process each queue item and add them to transaction table and search index. Can also be used for updating existing items if Transaction.ID is specified. Also generates ID if it's null and sets Date to DateTime.Now if it isn't set.

DeleteReIndexItemBatch ( ) : void
DeleteTransaction ( int mvanumber, System.Guid id ) : void

Deletes transaction table storage entity that matches the mva number and ID. Throws exception when a entity is found with given ID but entity's mva number does not match with the one given as input.

DeleteTransactionTotalsItemWithID ( ) : void
EnsureStorageCreated ( ) : System.Threading.Tasks.Task
GetReIndexableItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
GetTransactionItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable

For batch-processing all entities inside the transactions table.

GetTransactionTotalsItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
GetTransactionsForCustomer ( System.Guid customerInternalId, int dateVal, bool onlyInvoiceable = false ) : Task>
GetTransactionsForInvoicing ( int mvanumber, int dateVal, bool includeId = true ) : Task>
SetTransactionAsBilled ( int mvanumber, System.Guid transactionID, int orderItemID ) : void

Private Methods

Méthode Description
AddReIndexRequestIfNeeded ( ) : void
EnsureTransactionHasCustomerInternalID ( ) : void
SerializeTransactionAndAddToQueue ( Transaction t ) : void

For internal use, skips Transaction validation.

Method Details

AddOrUpdateTransaction() public méthode

Adds new transaction to table storage or updates an existing item. Throws exception when item is not valid, resolving customer external ID failed or if table storage operation fails.
public AddOrUpdateTransaction ( Transaction t ) : void
t Transaction Transaction item to add/update
Résultat void

AddOrUpdateTransaction() public méthode

Inserts or updates (using merge operation) the transaction table entity.
public AddOrUpdateTransaction ( TransactionTableEntity ent ) : void
ent Unipluss.TransactionService.Models.TransactionTableEntity
Résultat void

AddOrUpdateTransactionBatch() public méthode

Inserts or updates (using merge operation) a batch of transaction table entities. Also generates IDs for items that do not have them and sets Date to DateTime.Now if it is null.
Thrown when any of the items is not valid or if adding to either table storage or search index failed.
public AddOrUpdateTransactionBatch ( IEnumerable batch ) : void
batch IEnumerable Batch of Transaction items to add/update
Résultat void

AddOrUpdateTransactionTotalsItem() public méthode

public AddOrUpdateTransactionTotalsItem ( ) : void
Résultat void

AddReIndexableItemBatch() public méthode

public AddReIndexableItemBatch ( ) : void
Résultat void

AddTransactionBatchToUpdateQueue() public méthode

Adds a batch of transaction items to WebJob queues. Workers process each queue item and add them to transaction table and search index. Can also be used for updating existing items if Transaction.ID is specified. Also generates IDs for items that do not have them and sets Date to DateTime.Now if it is null.
public AddTransactionBatchToUpdateQueue ( IEnumerable batch ) : IEnumerable
batch IEnumerable Batch of Transaction items to add/update
Résultat IEnumerable

AddTransactionToUpdateQueue() public méthode

Adds the transaction item to WebJob queues. Workers process each queue item and add them to transaction table and search index. Can also be used for updating existing items if Transaction.ID is specified. Also generates ID if it's null and sets Date to DateTime.Now if it isn't set.
public AddTransactionToUpdateQueue ( Transaction t ) : Transaction
t Transaction Transaction item to add/update
Résultat Transaction

DeleteReIndexItemBatch() public méthode

public DeleteReIndexItemBatch ( ) : void
Résultat void

DeleteTransaction() public méthode

Deletes transaction table storage entity that matches the mva number and ID. Throws exception when a entity is found with given ID but entity's mva number does not match with the one given as input.
public DeleteTransaction ( int mvanumber, System.Guid id ) : void
mvanumber int
id System.Guid
Résultat void

DeleteTransactionTotalsItemWithID() public méthode

public DeleteTransactionTotalsItemWithID ( ) : void
Résultat void

EnsureStorageCreated() public méthode

public EnsureStorageCreated ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

GetReIndexableItemBatch() public méthode

public GetReIndexableItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
token Microsoft.WindowsAzure.Storage.Table.TableContinuationToken
Résultat IEnumerable

GetTransactionItemBatch() public méthode

For batch-processing all entities inside the transactions table.
public GetTransactionItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
token Microsoft.WindowsAzure.Storage.Table.TableContinuationToken For continuing a batch query or null to start from the beginning
Résultat IEnumerable

GetTransactionTotalsItemBatch() public méthode

public GetTransactionTotalsItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
token Microsoft.WindowsAzure.Storage.Table.TableContinuationToken
Résultat IEnumerable

GetTransactionsForCustomer() public méthode

public GetTransactionsForCustomer ( System.Guid customerInternalId, int dateVal, bool onlyInvoiceable = false ) : Task>
customerInternalId System.Guid
dateVal int
onlyInvoiceable bool
Résultat Task>

GetTransactionsForInvoicing() public méthode

public GetTransactionsForInvoicing ( int mvanumber, int dateVal, bool includeId = true ) : Task>
mvanumber int
dateVal int
includeId bool
Résultat Task>

SetTransactionAsBilled() public méthode

public SetTransactionAsBilled ( int mvanumber, System.Guid transactionID, int orderItemID ) : void
mvanumber int
transactionID System.Guid
orderItemID int
Résultat void

Property Details

tableRequestOptions protected_oe property

protected TableRequestOptions,Microsoft.WindowsAzure.Storage.Table tableRequestOptions
Résultat Microsoft.WindowsAzure.Storage.Table.TableRequestOptions