コード例 #1
0
        private ExchangeCoin EntityToContract(Entities.Portfolio.ExchangeCoin entity)
        {
            var contract = new ExchangeCoin
            {
                ExchangeCoinId = entity.Id,
                Exchange       = entity.Exchange,
                Quantity       = entity.Quantity,
                Symbol         = entity.Symbol
            };

            return(contract);
        }
コード例 #2
0
        private Entities.Portfolio.ExchangeCoin ContractToEntity(ExchangeCoin contract)
        {
            var entity = new Entities.Portfolio.ExchangeCoin
            {
                Id         = contract.ExchangeCoinId,
                AverageBuy = contract.AverageBuy,
                Exchange   = contract.Exchange,
                Quantity   = contract.Quantity,
                Symbol     = contract.Symbol
            };

            return(entity);
        }