private BuyAndHoldSplitDto MapSplitViewModelToDto(BuyAndHoldSplitViewModel model) { var dto = new BuyAndHoldSplitDto { Id = model.Id, SplitDate = model.SplitDate, BuyAndHoldTransactionId = model.BuyAndHoldTransactionId, Symbol = model.Symbol, SecurityId = model.SecurityId, Type = model.Type, NumberShares = model.NumberShares, SplitRatio = model.SplitRatio, NewShares = model.NewShares, ExistingShares = model.ExistingShares, Reverse = model.Reverse, Adjust = model.Adjust, ValidFrom = model.ValidFrom, ValidTo = model.ValidTo, Notes = model.Notes, //Url1 = model.Url1, //Url2 = model.Url2, //Url3 = model.Url3 }; return dto; }
private BuyAndHoldSplitDto MapBuyAndHoldSplit(BuyAndHoldSplit model) { var dto = new BuyAndHoldSplitDto { Id = model.Id, SplitDate = model.SplitDate, BuyAndHoldTransactionId = model.BuyAndHoldTransactionId, Symbol = model.TickerSymbol, SecurityId = model.SecurityId, // Type = model.Type, NumberShares = model.NumberShares, SplitRatio = model.Split, NewShares = model.NewShares, ExistingShares = model.ExistingShares, Reverse = model.Reverse.HasValue ? model.Reverse.Value : false, Adjust = model.Adjust.HasValue ? model.Adjust.Value : false, ValidFrom = model.ValidFrom, ValidTo = model.ValidTo, Notes = model.Notes, // Url1 = model.Url1, // Url2 = model.Url2, // Url3 = model.Url3 }; return dto; }
private BuyAndHoldSplitViewModel MapSplitDtoToViewModel(BuyAndHoldSplitDto dto) { return new BuyAndHoldSplitViewModel { Id = dto.Id, SplitDate = dto.SplitDate, BuyAndHoldTransactionId = dto.BuyAndHoldTransactionId, Symbol = dto.Symbol, SecurityId = dto.SecurityId, Type = dto.Type, NumberShares = dto.NumberShares, SplitRatio = dto.SplitRatio, NewShares = dto.NewShares, ExistingShares = dto.ExistingShares, Reverse = dto.Reverse, Adjust = dto.Adjust, ValidFrom = dto.ValidFrom, ValidTo = dto.ValidTo, Notes = dto.Notes, //Url1 = model.Url1, //Url2 = model.Url2, //Url3 = model.Url3 }; }