private void AddAssetHistory(AccountDto account)
    {
        var accountBalanceForCurrentDay = new AssetHistoryDto
        {
            AccountId = account.Id,
            Value     = (int)account.Balance
        };

        _dbRepository.QueueAdd <Asset, AssetHistoryDto>(accountBalanceForCurrentDay);
    }
Ejemplo n.º 2
0
        private static AssetHistoryReadModel MapToModel(AssetHistoryDto input)
        {
            var model = new AssetHistoryReadModel();

            MappingHelper.PopulateReadModel(input, model);

            // Map the extra properties belonging only to the AssetHistoryReadModel.
            model.AssetId   = input.AssetId;
            model.ProductId = input.Product.Id.Value;

            return(model);
        }
    private void UpdateAssetHistory(AssetHistoryDto assetHistoryForCurrentDay, AccountDto account)
    {
        assetHistoryForCurrentDay.Value = (int)account.Balance;

        _dbRepository.QueueUpdate <Asset, AssetHistoryDto>(assetHistoryForCurrentDay);
    }