private Entities.Portfolio.CoinBuy ContractToEntity(CoinBuy contract) { var entity = new Entities.Portfolio.CoinBuy { Id = contract.CoinBuyId, Exchange = contract.Exchange, OrderId = contract.OrderId, Pair = contract.Pair, Price = contract.Price, FilledQuantity = contract.FilledQuantity, Quantity = contract.Quantity, PlaceDate = contract.PlaceDate, BTCPrice = contract.BTCPrice, ClosedDate = contract.ClosedDate, CoinBuyId = contract.CoinBuyId, QuantityApplied = contract.QuantityApplied, Side = contract.Side, Status = contract.Status }; return(entity); }
private CoinBuy EntityToContract(Entities.Portfolio.CoinBuy entity) { var contract = new CoinBuy { CoinBuyId = entity.Id, Exchange = entity.Exchange, OrderId = entity.OrderId, Pair = entity.Pair, Price = entity.Price, BTCPrice = entity.BTCPrice, ClosedDate = entity.ClosedDate, ExchangeOrderId = entity.Id, FilledQuantity = entity.FilledQuantity, PlaceDate = entity.PlaceDate, Quantity = entity.Quantity, QuantityApplied = entity.QuantityApplied, Side = entity.Side, Status = entity.Status }; return(contract); }