public ActionResult EditSpinOff(BuyAndHoldMergerViewModel model)
 {
     //var transaction = GetTransaction(id);
     var dto = MapMergerViewModelToDto(model);
     var buyAndHoldTransactionDto = _buyAndHoldService.UpdateBuyAndHoldMerger(dto);
     //model = MapTransactionDtoToTransactionViewModel(transaction);
     return View(model);
 }
        private BuyAndHoldMergerViewModel MapMergerDtoToViewModel(BuyAndHoldMergerDto dto)
        {
            var model = new BuyAndHoldMergerViewModel
            {
                Id = dto.Id,
                TransactionDate = dto.TransactionDate,
                BuyAndHoldTransactionId_In = dto.BuyAndHoldTransactionId_In,
                TickerSymbol_In = dto.TickerSymbol_In,
                SecurityId_In = dto.SecurityId_In,
                Type_In = dto.Type_In,
                AmountInvested_In = dto.AmountInvested_In,
                NumberShares_In = dto.NumberShares_In,
                BuyPrice_In = dto.BuyPrice_In,
                BuyAndHoldTransactionId_Out = dto.BuyAndHoldTransactionId_Out,
                TickerSymbol_Out = dto.TickerSymbol_Out,
                SecurityId_Out = dto.SecurityId_Out,
                Type_Out = dto.Type_Out,
                AmountInvested_Out = dto.AmountInvested_Out,
                NumberShares_Out = dto.NumberShares_Out,
                BuyPrice_Out = dto.BuyPrice_Out,
                TransactionApplied = dto.TransactionApplied,
                ExchangeRate = dto.ExchangeRate,
                Notes = dto.Notes,
                Url1 = dto.Url1,
                Url2 = dto.Url2,
                Url3 = dto.Url3
            };

            return model;
        }
        private BuyAndHoldMergerDto MapMergerViewModelToDto(BuyAndHoldMergerViewModel model)
        {
            var dto = new BuyAndHoldMergerDto
            {
                Id = model.Id,
                TransactionDate = model.TransactionDate,
                BuyAndHoldTransactionId_In = model.BuyAndHoldTransactionId_In,
                TickerSymbol_In = model.TickerSymbol_In,
                SecurityId_In = model.SecurityId_In,
                Type_In = model.Type_In,
                AmountInvested_In = model.AmountInvested_In,
                NumberShares_In = model.NumberShares_In,
                BuyPrice_In = model.BuyPrice_In,
                BuyAndHoldTransactionId_Out = model.BuyAndHoldTransactionId_Out,
                TickerSymbol_Out = model.TickerSymbol_Out,
                SecurityId_Out = model.SecurityId_Out,
                Type_Out = model.Type_Out,
                AmountInvested_Out = model.AmountInvested_Out,
                NumberShares_Out = model.NumberShares_Out,
                BuyPrice_Out = model.BuyPrice_Out,
                TransactionApplied = model.TransactionApplied,
                ExchangeRate = model.ExchangeRate,
                Notes = model.Notes,
                Url1 = model.Url1,
                Url2 = model.Url2,
                Url3 = model.Url3
            };

            return dto;
        }