C# Класс Unipluss.TransactionService.DAL.TransactionRepository

Наследование: ITransactionRepository
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
tableRequestOptions Microsoft.WindowsAzure.Storage.Table.TableRequestOptions

Private Properties

Свойство Тип Описание
AddReIndexRequestIfNeeded void
EnsureTransactionHasCustomerInternalID void
SerializeTransactionAndAddToQueue void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
AddReIndexRequestIfNeeded ( ) : void
EnsureTransactionHasCustomerInternalID ( ) : void
SerializeTransactionAndAddToQueue ( Transaction t ) : void

For internal use, skips Transaction validation.

Описание методов

AddOrUpdateTransaction() публичный Метод

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
Результат void

AddOrUpdateTransaction() публичный Метод

Inserts or updates (using merge operation) the transaction table entity.
public AddOrUpdateTransaction ( TransactionTableEntity ent ) : void
ent Unipluss.TransactionService.Models.TransactionTableEntity
Результат void

AddOrUpdateTransactionBatch() публичный Метод

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
Результат void

AddOrUpdateTransactionTotalsItem() публичный Метод

public AddOrUpdateTransactionTotalsItem ( ) : void
Результат void

AddReIndexableItemBatch() публичный Метод

public AddReIndexableItemBatch ( ) : void
Результат void

AddTransactionBatchToUpdateQueue() публичный Метод

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
Результат IEnumerable

AddTransactionToUpdateQueue() публичный Метод

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
Результат Transaction

DeleteReIndexItemBatch() публичный Метод

public DeleteReIndexItemBatch ( ) : void
Результат void

DeleteTransaction() публичный Метод

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
Результат void

DeleteTransactionTotalsItemWithID() публичный Метод

public DeleteTransactionTotalsItemWithID ( ) : void
Результат void

EnsureStorageCreated() публичный Метод

public EnsureStorageCreated ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

GetReIndexableItemBatch() публичный Метод

public GetReIndexableItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
token Microsoft.WindowsAzure.Storage.Table.TableContinuationToken
Результат IEnumerable

GetTransactionItemBatch() публичный Метод

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
Результат IEnumerable

GetTransactionTotalsItemBatch() публичный Метод

public GetTransactionTotalsItemBatch ( Microsoft.WindowsAzure.Storage.Table.TableContinuationToken &token ) : IEnumerable
token Microsoft.WindowsAzure.Storage.Table.TableContinuationToken
Результат IEnumerable

GetTransactionsForCustomer() публичный Метод

public GetTransactionsForCustomer ( System.Guid customerInternalId, int dateVal, bool onlyInvoiceable = false ) : Task>
customerInternalId System.Guid
dateVal int
onlyInvoiceable bool
Результат Task>

GetTransactionsForInvoicing() публичный Метод

public GetTransactionsForInvoicing ( int mvanumber, int dateVal, bool includeId = true ) : Task>
mvanumber int
dateVal int
includeId bool
Результат Task>

SetTransactionAsBilled() публичный Метод

public SetTransactionAsBilled ( int mvanumber, System.Guid transactionID, int orderItemID ) : void
mvanumber int
transactionID System.Guid
orderItemID int
Результат void

Описание свойств

tableRequestOptions защищенное свойство

protected TableRequestOptions,Microsoft.WindowsAzure.Storage.Table tableRequestOptions
Результат Microsoft.WindowsAzure.Storage.Table.TableRequestOptions